[Pkg-mysql-commits] r1519 - in mysql-dfsg-5.0/branches: . unstable unstable/debian unstable/debian/additions unstable/debian/additions/innotop unstable/debian/additions/manpages unstable/debian/additions/mysqlreport unstable/debian/patches unstable/debian/po

Norbert Tretkowski nobse at alioth.debian.org
Sun Feb 15 16:44:02 UTC 2009


tags 50069 pending
tags 58033 pending
tags 58875 pending
tags 65070 pending
tags 66452 pending
tags 68669 pending
tags 68939 pending
tags 70431 pending
tags 70707 pending
tags 71057 pending
tags 71253 pending
tags 71254 pending
tags 71257 pending
tags 71258 pending
tags 71259 pending
tags 71262 pending
tags 71266 pending
tags 71267 pending
tags 71268 pending
tags 71271 pending
tags 71275 pending
tags 71277 pending
tags 71278 pending
tags 71283 pending
tags 71291 pending
tags 74939 pending
tags 74952 pending
tags 75711 pending
tags 75737 pending
tags 76798 pending
tags 78197 pending
tags 78235 pending
tags 78634 pending
tags 78639 pending
tags 78988 pending
tags 79392 pending
tags 79400 pending
tags 79451 pending
tags 79550 pending
tags 79658 pending
tags 79660 pending
tags 79672 pending
tags 81942 pending
tags 82881 pending
tags 83790 pending
tags 84068 pending
tags 86033 pending
tags 88186 pending
tags 89801 pending
tags 90257 pending
tags 92787 pending
tags 94230 pending
tags 94306 pending
tags 95441 pending
tags 96768 pending
tags 98164 pending
tags 98324 pending
tags 99131 pending
tags 99274 pending
tags 100884 pending
tags 101529 pending
tags 101783 pending
tags 103143 pending
tags 103145 pending
tags 105672 pending
tags 106752 pending
tags 106934 pending
tags 110624 pending
tags 111573 pending
tags 112174 pending
tags 112904 pending
tags 113430 pending
tags 114490 pending
tags 114492 pending
tags 114582 pending
tags 115677 pending
tags 119122 pending
tags 122676 pending
tags 123332 pending
tags 126147 pending
tags 128473 pending
tags 129020 pending
tags 129887 pending
tags 130105 pending
tags 130326 pending
tags 131697 pending
tags 131711 pending
tags 131743 pending
tags 132048 pending
tags 132238 pending
tags 132390 pending
tags 133863 pending
tags 134754 pending
tags 135030 pending
tags 135846 pending
tags 136529 pending
tags 136798 pending
tags 137115 pending
tags 137146 pending
tags 138143 pending
tags 138347 pending
tags 139799 pending
tags 141555 pending
tags 143282 pending
tags 144960 pending
tags 145322 pending
tags 147869 pending
tags 148658 pending
tags 149952 pending
tags 151021 pending
tags 151022 pending
tags 151903 pending
tags 153591 pending
tags 153702 pending
tags 157038 pending
tags 157731 pending
tags 158884 pending
tags 159779 pending
tags 163497 pending
tags 166391 pending
tags 166432 pending
tags 167270 pending
tags 168533 pending
tags 168535 pending
tags 173142 pending
tags 173553 pending
tags 173866 pending
tags 174790 pending
tags 181525 pending
tags 182655 pending
tags 185929 pending
tags 186656 pending
tags 188064 pending
tags 188066 pending
tags 188067 pending
tags 188160 pending
tags 188201 pending
tags 188248 pending
tags 188659 pending
tags 191776 pending
tags 192087 pending
tags 194621 pending
tags 194739 pending
tags 200277 pending
tags 200304 pending
tags 205587 pending
tags 207090 pending
tags 208030 pending
tags 208364 pending
tags 210403 pending
tags 210841 pending
tags 210988 pending
tags 211618 pending
tags 211983 pending
tags 213349 pending
tags 213456 pending
tags 214436 pending
tags 214636 pending
tags 214952 pending
tags 215046 pending
tags 215791 pending
tags 215973 pending
tags 216162 pending
tags 217273 pending
tags 217399 pending
tags 219263 pending
tags 219400 pending
tags 220229 pending
tags 221496 pending
tags 224148 pending
tags 224906 pending
tags 225028 pending
tags 225206 pending
tags 226789 pending
tags 226863 pending
tags 227927 pending
tags 228834 pending
tags 230327 pending
tags 231039 pending
tags 232118 pending
tags 235363 pending
tags 236288 pending
tags 236651 pending
tags 236878 pending
tags 239168 pending
tags 239421 pending
tags 240515 pending
tags 241328 pending
tags 241749 pending
tags 242449 pending
tags 246789 pending
tags 251838 pending
tags 252802 pending
tags 253434 pending
tags 253510 pending
tags 254070 pending
tags 256485 pending
tags 257725 pending
tags 259518 pending
tags 260306 pending
tags 260843 pending
tags 261130 pending
tags 261382 pending
tags 262541 pending
tags 263111 pending
tags 263215 pending
tags 264233 pending
tags 264620 pending
tags 264840 pending
tags 265811 pending
tags 266445 pending
tags 269110 pending
tags 269811 pending
tags 269865 pending
tags 269985 pending
tags 270800 pending
tags 271097 pending
tags 271334 pending
tags 271591 pending
tags 271632 pending
tags 271803 pending
tags 274264 pending
tags 274598 pending
tags 275109 pending
tags 276320 pending
tags 277028 pending
tags 278638 pending
tags 281158 pending
tags 282256 pending
tags 282486 pending
tags 283222 pending
tags 283786 pending
tags 285044 pending
tags 285071 pending
tags 285107 pending
tags 285438 pending
tags 285446 pending
tags 285709 pending
tags 285977 pending
tags 285982 pending
tags 285988 pending
tags 286035 pending
tags 286175 pending
tags 286538 pending
tags 286560 pending
tags 286863 pending
tags 286961 pending
tags 287003 pending
tags 287573 pending
tags 287735 pending
tags 287792 pending
tags 287955 pending
tags 289131 pending
tags 289840 pending
tags 289851 pending
tags 290670 pending
tags 291122 pending
tags 291300 pending
tags 291634 pending
tags 293345 pending
tags 293431 pending
tags 293786 pending
tags 293983 pending
tags 294347 pending
tags 295170 pending
tags 295247 pending
tags 295312 pending
tags 295507 pending
tags 296403 pending
tags 297062 pending
tags 297198 pending
tags 297404 pending
tags 297467 pending
tags 297687 pending
tags 297772 pending
tags 298295 pending
tags 298447 pending
tags 298875 pending
tags 299029 pending
tags 299031 pending
tags 299065 pending
tags 299382 pending
tags 299844 pending
tags 301413 pending
tags 301741 pending
tags 301807 pending
tags 302284 pending
tags 302712 pending
tags 303417 pending
tags 304897 pending
tags 307473 pending
tags 308353 pending
tags 308691 pending
tags 308966 pending
tags 310197 pending
tags 310263 pending
tags 310296 pending
tags 310526 pending
tags 310878 pending
tags 311836 pending
tags 313006 pending
tags 313957 pending
tags 314785 pending
tags 316127 pending
tags 316297 pending
tags 318011 pending
tags 318435 pending
tags 321765 pending
tags 322384 pending
tags 324623 pending
tags 324805 pending
tags 324834 pending
tags 326316 pending
tags 326427 pending
tags 326698 pending
tags 326769 pending
tags 327702 pending
tags 328613 pending
tags 329772 pending
tags 330149 pending
tags 333090 pending
tags 333670 pending
tags 334444 pending
tags 334517 pending
tags 334957 pending
tags 335219 pending
tags 335244 pending
tags 335547 pending
tags 336759 pending
tags 337082 pending
tags 339628 pending
tags 340193 pending
tags 340589 pending
tags 345895 pending
tags 348182 pending
tags 348682 pending
tags 348854 pending
tags 349013 pending
tags 349258 pending
tags 349522 pending
tags 349592 pending
tags 349661 pending
tags 351216 pending
tags 352070 pending
tags 352587 pending
tags 353924 pending
tags 353971 pending
tags 354111 pending
tags 354300 pending
tags 354544 pending
tags 354850 pending
tags 355302 pending
tags 355702 pending
tags 355978 pending
tags 356332 pending
tags 356503 pending
tags 357424 pending
tags 359701 pending
tags 360443 pending
tags 361257 pending
tags 362126 pending
tags 363062 pending
tags 363458 pending
tags 364401 pending
tags 364464 pending
tags 364899 pending
tags 364991 pending
tags 365050 pending
tags 365135 pending
tags 365433 pending
tags 365460 pending
tags 365938 pending
tags 365939 pending
tags 366155 pending
tags 366534 pending
tags 366824 pending
tags 367027 pending
tags 367083 pending
tags 367141 pending
tags 367160 pending
tags 367384 pending
tags 368186 pending
tags 368547 pending
tags 368639 pending
tags 368661 pending
tags 368663 pending
tags 369970 pending
tags 371841 pending
tags 377651 pending
tags 378949 pending
tags 379199 pending
tags 380271 pending
tags 381038 pending
tags 381043 pending
tags 382778 pending
tags 383700 pending
tags 383759 pending
tags 384047 pending
tags 384221 pending
tags 384399 pending
tags 384798 pending
tags 385119 pending
tags 385147 pending
tags 385348 pending
tags 385669 pending
tags 385874 pending
tags 385947 pending
tags 386274 pending
tags 386337 pending
tags 387369 pending
tags 387481 pending
tags 388262 pending
tags 388491 pending
tags 388941 pending
tags 389102 pending
tags 389443 pending
tags 390315 pending
tags 390692 pending
tags 390889 pending
tags 390980 pending
tags 391625 pending
tags 391741 pending
tags 392809 pending
tags 393334 pending
tags 393868 pending
tags 394262 pending
tags 394607 pending
tags 394992 pending
tags 395921 pending
tags 397597 pending
tags 398186 pending
tags 398784 pending
tags 399045 pending
tags 399074 pending
tags 399087 pending
tags 399602 pending
tags 400460 pending
tags 400809 pending
tags 401083 pending
tags 401305 pending
tags 401434 pending
tags 401953 pending
tags 403081 pending
tags 403082 pending
tags 403163 pending
tags 403721 pending
tags 403821 pending
tags 403943 pending
tags 404084 pending
tags 404318 pending
tags 404566 pending
tags 405018 pending
tags 405787 pending
tags 405793 pending
tags 406229 pending
tags 406435 pending
tags 407809 pending
tags 407859 pending
tags 408159 pending
tags 408362 pending
tags 408533 pending
tags 409750 pending
tags 409780 pending
tags 410474 pending
tags 411165 pending
tags 411328 pending
tags 411330 pending
tags 411339 pending
tags 411341 pending
tags 411345 pending
tags 411347 pending
tags 411368 pending
tags 411370 pending
tags 411377 pending
tags 411379 pending
tags 411442 pending
tags 411457 pending
tags 411480 pending
tags 411536 pending
tags 411764 pending
tags 414790 pending
tags 415026 pending
tags 416145 pending
tags 416838 pending
tags 418672 pending
tags 419974 pending
tags 420118 pending
tags 421026 pending
tags 421349 pending
tags 421516 pending
tags 421751 pending
tags 421766 pending
tags 422187 pending
tags 422428 pending
tags 424276 pending
tags 424590 pending
tags 424778 pending
tags 426442 pending
tags 426545 pending
tags 426783 pending
tags 430018 pending
tags 430944 pending
tags 431018 pending
tags 431825 pending
tags 435165 pending
tags 435744 pending
tags 436552 pending
tags 438375 pending
tags 442684 pending
tags 444216 pending
tags 448776 pending
tags 451235 pending
tags 452558 pending
tags 453127 pending
tags 453820 pending
tags 454227 pending
tags 455010 pending
tags 455737 pending
tags 456193 pending
tags 457915 pending
tags 458695 pending
tags 458798 pending
tags 460402 pending
tags 460873 pending
tags 461759 pending
tags 462158 pending
tags 462265 pending
tags 463137 pending
tags 463515 pending
tags 463704 pending
tags 471737 pending
tags 471887 pending
tags 474893 pending
tags 478256 pending
tags 478319 pending
tags 478553 pending
tags 478672 pending
tags 479363 pending
tags 479697 pending
tags 480292 pending
tags 480362 pending
tags 480525 pending
tags 480647 pending
tags 480924 pending
tags 480940 pending
tags 480965 pending
tags 481154 pending
tags 481303 pending
tags 481840 pending
tags 482466 pending
tags 484012 pending
tags 484704 pending
tags 485971 pending
tags 486149 pending
tags 486307 pending
tags 486443 pending
tags 486554 pending
tags 486709 pending
tags 486944 pending
tags 487270 pending
tags 488740 pending
tags 489266 pending
tags 491363 pending
tags 491688 pending
tags 492723 pending
tags 494238 pending
tags 498362 pending
tags 501413 pending
tags 505179 pending
tags 505181 pending
tags 507789 pending
thanks

Author: nobse
Date: 2009-02-15 16:44:02 +0000 (Sun, 15 Feb 2009)
New Revision: 1519

Added:
   mysql-dfsg-5.0/branches/unstable/
   mysql-dfsg-5.0/branches/unstable/debian/
   mysql-dfsg-5.0/branches/unstable/debian/README.Maintainer
   mysql-dfsg-5.0/branches/unstable/debian/additions/
   mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Images__Makefile.in
   mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Makefile.in
   mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start
   mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start.inc.sh
   mysql-dfsg-5.0/branches/unstable/debian/additions/echo_stderr
   mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/
   mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/InnoDBParser.pm
   mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/changelog.innotop
   mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop
   mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop.1
   mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/
   mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqlbug.1
   mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqldumpslow.1
   mysql-dfsg-5.0/branches/unstable/debian/additions/my.cnf
   mysql-dfsg-5.0/branches/unstable/debian/additions/mysql-server.lintian-overrides
   mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/
   mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport
   mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport.1
   mysql-dfsg-5.0/branches/unstable/debian/additions/ndb_mgmd.cnf
   mysql-dfsg-5.0/branches/unstable/debian/changelog
   mysql-dfsg-5.0/branches/unstable/debian/compat
   mysql-dfsg-5.0/branches/unstable/debian/control
   mysql-dfsg-5.0/branches/unstable/debian/copyright
   mysql-dfsg-5.0/branches/unstable/debian/copyright.more
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.README.Maintainer
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.dirs
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.docs
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.examples
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.files
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.links
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.lintian-overrides
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.NEWS
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.README.Debian
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.dirs
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.docs
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.files
   mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.postinst
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.NEWS
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.README.Debian
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.dirs
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.docs
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.files
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.links
   mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.lintian-overrides
   mysql-dfsg-5.0/branches/unstable/debian/mysql-common.dirs
   mysql-dfsg-5.0/branches/unstable/debian/mysql-common.files
   mysql-dfsg-5.0/branches/unstable/debian/mysql-common.postrm
   mysql-dfsg-5.0/branches/unstable/debian/mysql-common.preinst
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.NEWS
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.README.Debian
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.config
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.dirs
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.docs
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.files
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.links
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.lintian-overrides
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.paranoid
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.server
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.workstation
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb-mgm.init
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb.init
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-server.logrotate
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql.init
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postinst
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postrm
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.preinst
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.prerm
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.templates
   mysql-dfsg-5.0/branches/unstable/debian/mysql-server.preinst
   mysql-dfsg-5.0/branches/unstable/debian/patches/
   mysql-dfsg-5.0/branches/unstable/debian/patches/00list
   mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/25_mysys__default.c.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/37_scripts__mysqld_safe.sh__syslog.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/44_scripts__mysql_config__libs.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/45_warn-CLI-passwords.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/50_fix_agg_functions.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/60_disabled_tests.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/86_PATH_MAX.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/patches/89_ndb__staticlib.dpatch
   mysql-dfsg-5.0/branches/unstable/debian/po/
   mysql-dfsg-5.0/branches/unstable/debian/po/POTFILES.in
   mysql-dfsg-5.0/branches/unstable/debian/po/ar.po
   mysql-dfsg-5.0/branches/unstable/debian/po/ca.po
   mysql-dfsg-5.0/branches/unstable/debian/po/cs.po
   mysql-dfsg-5.0/branches/unstable/debian/po/da.po
   mysql-dfsg-5.0/branches/unstable/debian/po/de.po
   mysql-dfsg-5.0/branches/unstable/debian/po/es.po
   mysql-dfsg-5.0/branches/unstable/debian/po/eu.po
   mysql-dfsg-5.0/branches/unstable/debian/po/fi.po
   mysql-dfsg-5.0/branches/unstable/debian/po/fr.po
   mysql-dfsg-5.0/branches/unstable/debian/po/gl.po
   mysql-dfsg-5.0/branches/unstable/debian/po/it.po
   mysql-dfsg-5.0/branches/unstable/debian/po/ja.po
   mysql-dfsg-5.0/branches/unstable/debian/po/nb.po
   mysql-dfsg-5.0/branches/unstable/debian/po/nl.po
   mysql-dfsg-5.0/branches/unstable/debian/po/pt.po
   mysql-dfsg-5.0/branches/unstable/debian/po/pt_BR.po
   mysql-dfsg-5.0/branches/unstable/debian/po/ro.po
   mysql-dfsg-5.0/branches/unstable/debian/po/ru.po
   mysql-dfsg-5.0/branches/unstable/debian/po/sk.po
   mysql-dfsg-5.0/branches/unstable/debian/po/sv.po
   mysql-dfsg-5.0/branches/unstable/debian/po/templates.pot
   mysql-dfsg-5.0/branches/unstable/debian/po/tr.po
   mysql-dfsg-5.0/branches/unstable/debian/po/vi.po
   mysql-dfsg-5.0/branches/unstable/debian/rules
   mysql-dfsg-5.0/branches/unstable/debian/source.lintian-overrides
   mysql-dfsg-5.0/branches/unstable/debian/watch
Log:
Re-add 5.0.75-1

Added: mysql-dfsg-5.0/branches/unstable/debian/README.Maintainer
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/README.Maintainer	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/README.Maintainer	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,122 @@
+###########################################################################
+# Here are some information that are only of interest for the current and #
+# following Debian maintainers of MySQL.                                  #
+###########################################################################
+
+The debian/ directory is under SVN control at
+ svn+ssh://svn.debian.org/svn/pkg-mysql/branches/sid-5.0/debian
+
+#
+# Preparing a new version
+#
+The new orig.tar.gz (without non-free documentation) is created in /tmp/ when
+running this command:
+
+debian/rules get-orig-source
+
+#
+# mysqlreport
+#
+The authors e-mail address is <public at codenode.com>.
+
+#
+# SphinxSE
+#
+The authors email address is Andrew Aksyonoff <shodan at shodan.ru>. 
+
+The Sphinx Search engine itself is in the process of being packaged for Debian.
+
+#
+# Remarks to dependencies
+#
+libwrap0-dev (>= 7.6-8.3)
+	According to bug report 114582 where where build problems on
+	IA-64/sid with at least two prior versions.
+psmisc
+	/usr/bin/killall in the initscript
+
+zlib1g in libmysqlclient-dev:	
+	"mysql_config --libs" ads "-lz"
+
+Build-Dep:
+
+debhelper (>=4.1.16):
+	See po-debconf(7).
+
+autoconf (>= 2.13-20), automake1.7
+	Try to get rid of them.
+
+doxygen, tetex-bin, tetex-extra, gs
+	for ndb/docs/*tex
+
+mysql-server-5.0: Pre-Depends: mysql-common
+	This was necessary as mysql-server-5.0.preinst checks for unmodified
+	conffiles from mysql-server-4.1 and copies 5.0 ones over them to avoid
+	unnecessary dpkg questions. As mysql-server-5.0 is not unpacked at its 
+	pre-inst stage, it had to copy those files from a package that is 
+	definetly already unpacked which does not have to be the case with Depends.
+
+#
+# Remarks to the start scripts
+#
+
+## initscripts rely on mysqladmin from a different package
+We have the problem that "/etc/init.d/mysql stop" relies on mysqladmin which
+is in another package (mysql-client) and a passwordless access that's maybe
+only available if the user configured his /root/.my.cnf. Can this be a problem?
+* normal mode: not because the user is required to have it. Else:
+* purge/remove: not, same as normal mode
+* upgrade: not, same as normal mode
+* first install: not, it depends on mysql-client which at least is unpacked
+                 so mysqladmin is there (to ping). It is not yet configured
+		passwordles but if there's a server running then there's a
+                /root/.my.cnf. Anyways, we simply kill anything that's mysqld.
+
+## Passwordless access for the maintainer scripts
+Another issue is that the scripts needs passwordless access. To ensure this
+a debian-sys-maint user is configured which has process and shutdown privs.
+The file with the randomly (that's important!) generated password must be
+present as long as the databases remain installed because else a new install
+would have no access. This file should be used like:
+	mysqladmin --defaults-file=/etc/mysql/debian.cnf restart
+to avoid providing the password in plaintext on a commandline where it would 
+be visible to any user via the "ps" command.
+
+## When to start the daemon?
+We aim to give the admin full control on when MySQL is running.
+Issues to be faced here:
+OLD:
+        1. Debconf asks whether MySQL should be started on boot so update-rc.d is
+           only run if the answer has been yes. The admin is likely to forget
+           this decision but update-rc.d checks for an existing line in
+           /etc/runlevel.conf and leaves it intact.
+        2. On initial install, if the answer is yes, the daemon has to be started.
+        3. On upgrades it should only be started if it was already running, everything
+           else is confusing. Especiall relying on an debconf decision made month ago
+           is considered suboptimal. See bug #274264
+        Implementation so far:
+        prerm (called on upgrade before stopping the server): 
+          check for a running server and set flag if necessary
+        preinst (called on initial install and before unpacking when upgrading):
+          check for the debconf variable and set flag if necessary
+        postinst (called on initial install and after each upgrade after unpacking):
+          call update-rc.d if debconf says yes
+          call invoce-rc.d if the flag has been set
+        Problems remaining:
+          dpkg-reconfigure and setting mysql start on boot to yes did not start mysql
+          (ok "start on boot" literally does not mean "start now" so that might have been ok)
+NEW:
+        1. --- no debconf anymore for the sake of simplicity. We have runlevel.conf,
+           the admin should use it
+        2. On initial install the server is started.
+        3. On upgrades the server is started exactly if it was running before so the
+           runlevel configuration is irrelevant. It will be preserved by the mean of
+           update-rc.d's builtin check.
+        Implementation:
+        prerm (called on upgrade before stopping the server):
+          check for a running server and set flag if necessary
+        preinst (called on initial install and before unpacking when upgrading):
+          check for $1 beeing (initial) "install" and set flag
+        postinst (called on initial install and after each upgrade after unpacking):
+          call update-rc.d
+          call invoce-rc.d if the flag has been set

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Images__Makefile.in
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Images__Makefile.in	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Images__Makefile.in	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,6 @@
+all:
+
+distclean:
+	-rm -f Makefile
+
+.PHONY: all distclean clean install check

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Makefile.in
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Makefile.in	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/Docs__Makefile.in	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,6 @@
+all:
+
+distclean:
+	-rm -f Makefile
+
+.PHONY: all distclean clean install check

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# This script is executed by "/etc/init.d/mysql" on every (re)start.
+# 
+# Changes to this file will be preserved when updating the Debian package.
+#
+
+source /usr/share/mysql/debian-start.inc.sh
+
+MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
+MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
+MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
+MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
+MYCHECK_PARAMS="--all-databases --fast --silent"
+MYCHECK_RCPT="root"
+
+# The following commands should be run when the server is up but in background
+# where they do not block the server start and in one shell instance so that
+# they run sequentially. They are supposed not to echo anything to stdout.
+# If you want to disable the check for crashed tables comment
+# "check_for_crashed_tables" out.  
+# (There may be no output to stdout inside the background process!)
+echo "Checking for corrupt, not cleanly closed and upgrade needing tables."
+(
+  upgrade_system_tables_if_necessary;
+  check_root_accounts;
+  check_for_crashed_tables;
+) >&2 &
+
+exit 0

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start.inc.sh
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start.inc.sh	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/debian-start.inc.sh	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,72 @@
+#!/bin/bash
+#
+# This file is included by /etc/mysql/debian-start
+#
+
+## Check all unclosed tables.
+# - Requires the server to be up.
+# - Is supposed to run silently in background. 
+function check_for_crashed_tables() {
+  set -e
+  set -u
+
+  # But do it in the background to not stall the boot process.
+  logger -p daemon.info -i -t$0 "Triggering myisam-recover for all MyISAM tables"
+
+  # Checking for $? is unreliable so the size of the output is checked.
+  # Some table handlers like HEAP do not support CHECK TABLE.
+  tempfile=`tempfile`
+  # We have to use xargs in this case, because a for loop barfs on the 
+  # spaces in the thing to be looped over. 
+  LC_ALL=C $MYSQL --skip-column-names --batch -e  '
+      select concat("select count(*) into @discard from `",
+                    TABLE_SCHEMA, "`.`", TABLE_NAME, "`") 
+      from information_schema.TABLES where ENGINE="MyISAM"' | \
+    xargs -i $MYSQL --skip-column-names --silent --batch \
+                    --force -e "{}" >$tempfile 
+  if [ -s $tempfile ]; then
+    (
+      /bin/echo -e "\n" \
+        "Improperly closed tables are also reported if clients are accessing\n" \
+ 	"the tables *now*. A list of current connections is below.\n";
+       $MYADMIN processlist status
+    ) >> $tempfile
+    # Check for presence as a dependency on mailx would require an MTA.
+    if [ -x /usr/bin/mailx ]; then 
+      mailx -e -s"$MYCHECK_SUBJECT" $MYCHECK_RCPT < $tempfile 
+    fi
+    (echo "$MYCHECK_SUBJECT"; cat $tempfile) | logger -p daemon.warn -i -t$0
+  fi
+  rm $tempfile
+}
+
+## Check for tables needing an upgrade.
+# - Requires the server to be up.
+# - Is supposed to run silently in background. 
+function upgrade_system_tables_if_necessary() {
+  set -e
+  set -u
+
+  logger -p daemon.info -i -t$0 "Upgrading MySQL tables if necessary."
+
+  # Filter all "duplicate column", "duplicate key" and "unknown column"
+  # errors as the script is designed to be idempotent.
+  LC_ALL=C $MYUPGRADE \
+    2>&1 \
+    | egrep -v '^(1|@had|ERROR (1054|1060|1061))' \
+    | logger -p daemon.warn -i -t$0
+}
+
+## Check for the presence of both, root accounts with and without password.
+# This might have been caused by a bug related to mysql_install_db (#418672).
+function check_root_accounts() {
+  set -e
+  set -u
+  
+  logger -p daemon.info -i -t$0 "Checking for insecure root accounts."
+
+  ret=$( echo "SELECT count(*) FROM mysql.user WHERE user='root' and password='';" | $MYSQL --skip-column-names )
+  if [ "$ret" -ne "0" ]; then
+    logger -p daemon.warn -i -t$0 "WARNING: mysql.user contains $ret root accounts without password!"
+  fi
+}

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/echo_stderr
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/echo_stderr	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/echo_stderr	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo "$*" 1>&2

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/InnoDBParser.pm
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/InnoDBParser.pm	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/InnoDBParser.pm	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,1089 @@
+use strict;
+use warnings FATAL => 'all';
+
+package InnoDBParser;
+
+# This program is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com.
+# Feedback and improvements are gratefully received.
+#
+# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation, version 2; OR the Perl Artistic License.  On UNIX and similar
+# systems, you can issue `man perlgpl' or `man perlartistic' to read these
+
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA  02111-1307  USA
+
+our $VERSION = '1.6.0';
+
+use Data::Dumper;
+$Data::Dumper::Sortkeys = 1;
+use English qw(-no_match_vars);
+use List::Util qw(max);
+
+# Some common patterns
+my $d  = qr/(\d+)/;                    # Digit
+my $f  = qr/(\d+\.\d+)/;               # Float
+my $t  = qr/(\d+ \d+)/;                # Transaction ID
+my $i  = qr/((?:\d{1,3}\.){3}\d+)/;    # IP address
+my $n  = qr/([^`\s]+)/;                # MySQL object name
+my $w  = qr/(\w+)/;                    # Words
+my $fl = qr/([\w\.\/]+) line $d/;      # Filename and line number
+my $h  = qr/((?:0x)?[0-9a-f]*)/;       # Hex
+my $s  = qr/(\d{6} .\d:\d\d:\d\d)/;    # InnoDB timestamp
+
+# If you update this variable, also update the SYNOPSIS in the pod.
+my %innodb_section_headers = (
+   "TRANSACTIONS"                          => "tx",
+   "BUFFER POOL AND MEMORY"                => "bp",
+   "SEMAPHORES"                            => "sm",
+   "LOG"                                   => "lg",
+   "ROW OPERATIONS"                        => "ro",
+   "INSERT BUFFER AND ADAPTIVE HASH INDEX" => "ib",
+   "FILE I/O"                              => "io",
+   "LATEST DETECTED DEADLOCK"              => "dl",
+   "LATEST FOREIGN KEY ERROR"              => "fk",
+);
+
+my %parser_for = (
+   tx => \&parse_tx_section,
+   bp => \&parse_bp_section,
+   sm => \&parse_sm_section,
+   lg => \&parse_lg_section,
+   ro => \&parse_ro_section,
+   ib => \&parse_ib_section,
+   io => \&parse_io_section,
+   dl => \&parse_dl_section,
+   fk => \&parse_fk_section,
+);
+
+my %fk_parser_for = (
+   Transaction => \&parse_fk_transaction_error,
+   Error       => \&parse_fk_bad_constraint_error,
+   Cannot      => \&parse_fk_cant_drop_parent_error,
+);
+
+# A thread's proc_info can be at least 98 different things I've found in the
+# source.  Fortunately, most of them begin with a gerunded verb.  These are
+# the ones that don't.
+my %is_proc_info = (
+   'After create'                 => 1,
+   'Execution of init_command'    => 1,
+   'FULLTEXT initialization'      => 1,
+   'Reopen tables'                => 1,
+   'Repair done'                  => 1,
+   'Repair with keycache'         => 1,
+   'System lock'                  => 1,
+   'Table lock'                   => 1,
+   'Thread initialized'           => 1,
+   'User lock'                    => 1,
+   'copy to tmp table'            => 1,
+   'discard_or_import_tablespace' => 1,
+   'end'                          => 1,
+   'got handler lock'             => 1,
+   'got old table'                => 1,
+   'init'                         => 1,
+   'key cache'                    => 1,
+   'locks'                        => 1,
+   'malloc'                       => 1,
+   'query end'                    => 1,
+   'rename result table'          => 1,
+   'rename'                       => 1,
+   'setup'                        => 1,
+   'statistics'                   => 1,
+   'status'                       => 1,
+   'table cache'                  => 1,
+   'update'                       => 1,
+);
+
+sub new {
+   bless {}, shift;
+}
+
+# Parse the status and return it.
+# See srv_printf_innodb_monitor in innobase/srv/srv0srv.c
+# Pass in the text to parse, whether to be in debugging mode, which sections
+# to parse (hashref; if empty, parse all), and whether to parse full info from
+# locks and such (probably shouldn't unless you need to).
+sub parse_status_text {
+   my ( $self, $fulltext, $debug, $sections, $full ) = @_;
+
+   die "I can't parse undef" unless defined $fulltext;
+   $fulltext =~ s/[\r\n]+/\n/g;
+
+   $sections ||= {};
+   die '$sections must be a hashref' unless ref($sections) eq 'HASH';
+
+   my %innodb_data = (
+      got_all   => 0,         # Whether I was able to get the whole thing
+      ts        => '',        # Timestamp the server put on it
+      last_secs => 0,         # Num seconds the averages are over
+      sections  => {},        # Parsed values from each section
+   );
+
+   if ( $debug ) {
+      $innodb_data{'fulltext'} = $fulltext;
+   }
+
+   # Get the most basic info about the status: beginning and end, and whether
+   # I got the whole thing (if there has been a big deadlock and there are
+   # too many locks to print, the output might be truncated)
+   my ( $time_text ) = $fulltext =~ m/^$s INNODB MONITOR OUTPUT$/m;
+   $innodb_data{'ts'} = [ parse_innodb_timestamp( $time_text ) ];
+   $innodb_data{'timestring'} = ts_to_string($innodb_data{'ts'});
+   ( $innodb_data{'last_secs'} ) = $fulltext
+      =~ m/Per second averages calculated from the last $d seconds/;
+
+   ( my $got_all ) = $fulltext =~ m/END OF INNODB MONITOR OUTPUT/;
+   $innodb_data{'got_all'} = $got_all || 0;
+
+   # Split it into sections.  Each section begins with
+   # -----
+   # LABEL
+   # -----
+   my %innodb_sections;
+   my @matches = $fulltext
+      =~ m#\n(---+)\n([A-Z /]+)\n\1\n(.*?)(?=\n(---+)\n[A-Z /]+\n\4\n|$)#gs;
+   while ( my ( $start, $name, $text, $end ) = splice(@matches, 0, 4) ) {
+      $innodb_sections{$name} = [ $text, $end ? 1 : 0 ];
+   }
+   # The Row Operations section is a special case, because instead of ending
+   # with the beginning of another section, it ends with the end of the file.
+   # So this section is complete if the entire file is complete.
+   $innodb_sections{'ROW OPERATIONS'}->[1] ||= $innodb_data{'got_all'};
+
+   # Just for sanity's sake, make sure I understand what to do with each
+   # section
+   eval {
+      foreach my $section ( keys %innodb_sections ) {
+         my $header = $innodb_section_headers{$section};
+         die "Unknown section $section in $fulltext\n"
+            unless $header;
+         $innodb_data{'sections'}->{ $header }
+            ->{'fulltext'} = $innodb_sections{$section}->[0];
+         $innodb_data{'sections'}->{ $header }
+            ->{'complete'} = $innodb_sections{$section}->[1];
+      }
+   };
+   if ( $EVAL_ERROR ) {
+      _debug( $debug, $EVAL_ERROR);
+   }
+
+   # ################################################################
+   # Parse the detailed data out of the sections.
+   # ################################################################
+   eval {
+      foreach my $section ( keys %parser_for ) {
+         if ( defined $innodb_data{'sections'}->{$section}
+               && (!%$sections || (defined($sections->{$section} && $sections->{$section})) )) {
+            $parser_for{$section}->(
+                  $innodb_data{'sections'}->{$section},
+                  $innodb_data{'sections'}->{$section}->{'complete'},
+                  $debug,
+                  $full )
+               or delete $innodb_data{'sections'}->{$section};
+         }
+         else {
+            delete $innodb_data{'sections'}->{$section};
+         }
+      }
+   };
+   if ( $EVAL_ERROR ) {
+      _debug( $debug, $EVAL_ERROR);
+   }
+
+   return \%innodb_data;
+}
+
+# Parses the status text and returns it flattened out as a single hash.
+sub get_status_hash {
+   my ( $self, $fulltext, $debug, $sections, $full ) = @_;
+
+   # Parse the status text...
+   my $innodb_status
+      = $self->parse_status_text($fulltext, $debug, $sections, $full );
+
+   # Flatten the hierarchical structure into a single list by grabbing desired
+   # sections from it.
+   return
+      (map { 'IB_' . $_ => $innodb_status->{$_} } qw(timestring last_secs got_all)),
+      (map { 'IB_bp_' . $_ => $innodb_status->{'sections'}->{'bp'}->{$_} }
+         qw( writes_pending buf_pool_hit_rate total_mem_alloc buf_pool_reads
+            awe_mem_alloc pages_modified writes_pending_lru page_creates_sec
+            reads_pending pages_total buf_pool_hits writes_pending_single_page
+            page_writes_sec pages_read pages_written page_reads_sec
+            writes_pending_flush_list buf_pool_size add_pool_alloc
+            dict_mem_alloc pages_created buf_free complete )),
+      (map { 'IB_tx_' . $_ => $innodb_status->{'sections'}->{'tx'}->{$_} }
+         qw( num_lock_structs history_list_len purge_done_for transactions
+            purge_undo_for is_truncated trx_id_counter complete )),
+      (map { 'IB_ib_' . $_ => $innodb_status->{'sections'}->{'ib'}->{$_} }
+         qw( hash_table_size hash_searches_s non_hash_searches_s
+            bufs_in_node_heap used_cells size free_list_len seg_size inserts
+            merged_recs merges complete )),
+      (map { 'IB_lg_' . $_ => $innodb_status->{'sections'}->{'lg'}->{$_} }
+         qw( log_ios_done pending_chkp_writes last_chkp log_ios_s
+            log_flushed_to log_seq_no pending_log_writes complete )),
+      (map { 'IB_sm_' . $_ => $innodb_status->{'sections'}->{'sm'}->{$_} }
+         qw( wait_array_size rw_shared_spins rw_excl_os_waits mutex_os_waits
+            mutex_spin_rounds mutex_spin_waits rw_excl_spins rw_shared_os_waits
+            waits signal_count reservation_count complete )),
+      (map { 'IB_ro_' . $_ => $innodb_status->{'sections'}->{'ro'}->{$_} }
+         qw( queries_in_queue n_reserved_extents main_thread_state
+         main_thread_proc_no main_thread_id read_sec del_sec upd_sec ins_sec
+         read_views_open num_rows_upd num_rows_ins num_rows_read
+         queries_inside num_rows_del complete )),
+      (map { 'IB_fk_' . $_ => $innodb_status->{'sections'}->{'fk'}->{$_} }
+         qw( trigger parent_table child_index parent_index attempted_op
+         child_db timestring fk_name records col_name reason txn parent_db
+         type child_table parent_col complete )),
+      (map { 'IB_io_' . $_ => $innodb_status->{'sections'}->{'io'}->{$_} }
+         qw( pending_buffer_pool_flushes pending_pwrites pending_preads
+         pending_normal_aio_reads fsyncs_s os_file_writes pending_sync_ios
+         reads_s flush_type avg_bytes_s pending_ibuf_aio_reads writes_s
+         threads os_file_reads pending_aio_writes pending_log_ios os_fsyncs
+         pending_log_flushes complete )),
+      (map { 'IB_dl_' . $_ => $innodb_status->{'sections'}->{'dl'}->{$_} }
+         qw( timestring rolled_back txns complete ));
+
+}
+
+sub ts_to_string {
+   my $parts = shift;
+   return sprintf('%02d-%02d-%02d %02d:%02d:%02d', @$parts);
+}
+
+sub parse_innodb_timestamp {
+   my $text = shift;
+   my ( $y, $m, $d, $h, $i, $s )
+      = $text =~ m/^(\d\d)(\d\d)(\d\d) +(\d+):(\d+):(\d+)$/;
+   die("Can't get timestamp from $text\n") unless $y;
+   $y += 2000;
+   return ( $y, $m, $d, $h, $i, $s );
+}
+
+sub parse_fk_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   my $fulltext = $section->{'fulltext'};
+
+   return 0 unless $fulltext;
+
+   my ( $ts, $type ) = $fulltext =~ m/^$s\s+(\w+)/m;
+   $section->{'ts'} = [ parse_innodb_timestamp( $ts ) ];
+   $section->{'timestring'} = ts_to_string($section->{'ts'});
+   $section->{'type'} = $type;
+
+   # Decide which type of FK error happened, and dispatch to the right parser.
+   if ( $type && $fk_parser_for{$type} ) {
+      $fk_parser_for{$type}->( $section, $complete, $debug, $fulltext, $full );
+   }
+
+   delete $section->{'fulltext'} unless $debug;
+
+   return 1;
+}
+
+sub parse_fk_cant_drop_parent_error {
+   my ( $section, $complete, $debug, $fulltext, $full ) = @_;
+
+   # Parse the parent/child table info out
+   @{$section}{ qw(attempted_op parent_db parent_table) } = $fulltext
+      =~ m{Cannot $w table `(.*)/(.*)`}m;
+   @{$section}{ qw(child_db child_table) } = $fulltext
+      =~ m{because it is referenced by `(.*)/(.*)`}m;
+
+   ( $section->{'reason'} ) = $fulltext =~ m/(Cannot .*)/s;
+   $section->{'reason'} =~ s/\n(?:InnoDB: )?/ /gm
+      if $section->{'reason'};
+
+   # Certain data may not be present.  Make them '' if not present.
+   map { $section->{$_} ||= "" }
+      qw(child_index fk_name col_name parent_col);
+}
+
+# See dict/dict0dict.c, function dict_foreign_error_report
+# I don't care much about these.  There are lots of different messages, and
+# they come from someone trying to create a foreign key, or similar
+# statements.  They aren't indicative of some transaction trying to insert,
+# delete or update data.  Sometimes it is possible to parse out a lot of
+# information about the tables and indexes involved, but often the message
+# contains the DDL string the user entered, which is way too much for this
+# module to try to handle.
+sub parse_fk_bad_constraint_error {
+   my ( $section, $complete, $debug, $fulltext, $full ) = @_;
+
+   # Parse the parent/child table and index info out
+   @{$section}{ qw(child_db child_table) } = $fulltext
+      =~ m{Error in foreign key constraint of table (.*)/(.*):$}m;
+   $section->{'attempted_op'} = 'DDL';
+
+   # FK name, parent info... if possible.
+   @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) }
+      = $fulltext
+      =~ m/CONSTRAINT `?$n`? FOREIGN KEY \(`?$n`?\) REFERENCES (?:`?$n`?\.)?`?$n`? \(`?$n`?\)/;
+
+   if ( !defined($section->{'fk_name'}) ) {
+      # Try to parse SQL a user might have typed in a CREATE statement or such
+      @{$section}{ qw(col_name parent_db parent_table parent_col) }
+         = $fulltext
+         =~ m/FOREIGN\s+KEY\s*\(`?$n`?\)\s+REFERENCES\s+(?:`?$n`?\.)?`?$n`?\s*\(`?$n`?\)/i;
+   }
+   $section->{'parent_db'} ||= $section->{'child_db'};
+
+   # Name of the child index (index in the same table where the FK is, see
+   # definition of dict_foreign_struct in include/dict0mem.h, where it is
+   # called foreign_index, as opposed to referenced_index which is in the
+   # parent table.  This may not be possible to find.
+   @{$section}{ qw(child_index) } = $fulltext
+      =~ m/^The index in the foreign key in table is $n$/m;
+
+   @{$section}{ qw(reason) } = $fulltext =~ m/:\s*([^:]+)(?= Constraint:|$)/ms;
+   $section->{'reason'} =~ s/\s+/ /g
+      if $section->{'reason'};
+   
+   # Certain data may not be present.  Make them '' if not present.
+   map { $section->{$_} ||= "" }
+      qw(child_index fk_name col_name parent_table parent_col);
+}
+
+# see source file row/row0ins.c
+sub parse_fk_transaction_error {
+   my ( $section, $complete, $debug, $fulltext, $full ) = @_;
+
+   # Parse the txn info out
+   my ( $txn ) = $fulltext
+      =~ m/Transaction:\n(TRANSACTION.*)\nForeign key constraint fails/s;
+   if ( $txn ) {
+      $section->{'txn'} = parse_tx_text( $txn, $complete, $debug, $full );
+   }
+
+   # Parse the parent/child table and index info out.  There are two types: an
+   # update or a delete of a parent record leaves a child orphaned
+   # (row_ins_foreign_report_err), and an insert or update of a child record has
+   # no matching parent record (row_ins_foreign_report_add_err).
+
+   @{$section}{ qw(reason child_db child_table) }
+      = $fulltext =~ m{^(Foreign key constraint fails for table `(.*)/(.*)`:)$}m;
+
+   @{$section}{ qw(fk_name col_name parent_db parent_table parent_col) }
+      = $fulltext
+      =~ m/CONSTRAINT `$n` FOREIGN KEY \(`$n`\) REFERENCES (?:`$n`\.)?`$n` \(`$n`\)/;
+   $section->{'parent_db'} ||= $section->{'child_db'};
+
+   # Special case, which I don't know how to trigger, but see
+   # innobase/row/row0ins.c row_ins_check_foreign_constraint
+   if ( $fulltext =~ m/ibd file does not currently exist!/ ) {
+      my ( $attempted_op, $index, $records )
+         = $fulltext =~ m/^Trying to (add to index) `$n` tuple:\n(.*))?/sm;
+      $section->{'child_index'} = $index;
+      $section->{'attempted_op'} = $attempted_op || '';
+      if ( $records && $full ) {
+         ( $section->{'records'} )
+            = parse_innodb_record_dump( $records, $complete, $debug );
+      }
+      @{$section}{qw(parent_db parent_table)}
+         =~ m/^But the parent table `$n`\.`$n`$/m;
+   }
+   else {
+      my ( $attempted_op, $which, $index )
+         = $fulltext =~ m/^Trying to ([\w ]*) in (child|parent) table, in index `$n` tuple:$/m;
+      if ( $which ) {
+         $section->{$which . '_index'} = $index;
+         $section->{'attempted_op'} = $attempted_op || '';
+
+         # Parse out the related records in the other table.
+         my ( $search_index, $records );
+         if ( $which eq 'child' ) {
+            ( $search_index, $records ) = $fulltext
+               =~ m/^But in parent table [^,]*, in index `$n`,\nthe closest match we can find is record:\n(.*)/ms;
+            $section->{'parent_index'} = $search_index;
+         }
+         else {
+            ( $search_index, $records ) = $fulltext
+               =~ m/^But in child table [^,]*, in index `$n`, (?:the record is not available|there is a record:\n(.*))?/ms;
+            $section->{'child_index'} = $search_index;
+         }
+         if ( $records && $full ) {
+            $section->{'records'}
+               = parse_innodb_record_dump( $records, $complete, $debug );
+         }
+         else {
+            $section->{'records'} = '';
+         }
+      }
+   }
+
+   # Parse out the tuple trying to be updated, deleted or inserted.
+   my ( $trigger ) = $fulltext =~ m/^(DATA TUPLE: \d+ fields;\n.*)$/m;
+   if ( $trigger ) {
+      $section->{'trigger'} = parse_innodb_record_dump( $trigger, $complete, $debug );
+   }
+
+   # Certain data may not be present.  Make them '' if not present.
+   map { $section->{$_} ||= "" }
+      qw(child_index fk_name col_name parent_table parent_col);
+}
+
+# There are new-style and old-style record formats.  See rem/rem0rec.c
+# TODO: write some tests for this
+sub parse_innodb_record_dump {
+   my ( $dump, $complete, $debug ) = @_;
+   return undef unless $dump;
+
+   my $result = {};
+
+   if ( $dump =~ m/PHYSICAL RECORD/ ) {
+      my $style = $dump =~ m/compact format/ ? 'new' : 'old';
+      $result->{'style'} = $style;
+
+      # This is a new-style record.
+      if ( $style eq 'new' ) {
+         @{$result}{qw( heap_no type num_fields info_bits )}
+            = $dump
+            =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; compact format; info bits $d$/m;
+      }
+
+      # OK, it's old-style.  Unfortunately there are variations here too.
+      elsif ( $dump =~ m/-byte offs / ) {
+         # Older-old style.
+         @{$result}{qw( heap_no type num_fields byte_offset info_bits )}
+            = $dump
+            =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offs [A-Z]+; info bits $d$/m;
+            if ( $dump !~ m/-byte offs TRUE/ ) {
+               $result->{'byte_offset'} = 0;
+            }
+      }
+      else {
+         # Newer-old style.
+         @{$result}{qw( heap_no type num_fields byte_offset info_bits )}
+            = $dump
+            =~ m/^(?:Record lock, heap no $d )?([A-Z ]+): n_fields $d; $d-byte offsets; info bits $d$/m;
+      }
+
+   }
+   else {
+      $result->{'style'} = 'tuple';
+      @{$result}{qw( type num_fields )}
+         = $dump =~ m/^(DATA TUPLE): $d fields;$/m;
+   }
+
+   # Fill in default values for things that couldn't be parsed.
+   map { $result->{$_} ||= 0 }
+      qw(heap_no num_fields byte_offset info_bits);
+   map { $result->{$_} ||= '' }
+      qw(style type );
+
+   my @fields = $dump =~ m/ (\d+:.*?;?);(?=$| \d+:)/gm;
+   $result->{'fields'} = [ map { parse_field($_, $complete, $debug ) } @fields ];
+
+   return $result;
+}
+
+# New/old-style applies here.  See rem/rem0rec.c
+# $text should not include the leading space or the second trailing semicolon.
+sub parse_field {
+   my ( $text, $complete, $debug ) = @_;
+
+   # Sample fields:
+   # '4: SQL NULL, size 4 '
+   # '1: len 6; hex 000000005601; asc     V ;'
+   # '6: SQL NULL'
+   # '5: len 30; hex 687474703a2f2f7777772e737765657477617465722e636f6d2f73746f72; asc http://www.sweetwater.com/stor;...(truncated)'
+   my ( $id, $nullsize, $len, $hex, $asc, $truncated );
+   ( $id, $nullsize ) = $text =~ m/^$d: SQL NULL, size $d $/;
+   if ( !defined($id) ) {
+      ( $id ) = $text =~ m/^$d: SQL NULL$/;
+   }
+   if ( !defined($id) ) {
+      ( $id, $len, $hex, $asc, $truncated )
+         = $text =~ m/^$d: len $d; hex $h; asc (.*);(\.\.\.\(truncated\))?$/;
+   }
+
+   die "Could not parse this field: '$text'" unless defined $id;
+   return {
+      id    => $id,
+      len   => defined($len) ? $len : defined($nullsize) ? $nullsize : 0,
+      'hex' => defined($hex) ? $hex : '',
+      asc   => defined($asc) ? $asc : '',
+      trunc => $truncated ? 1 : 0,
+   };
+
+}
+
+sub parse_dl_section {
+   my ( $dl, $complete, $debug, $full ) = @_;
+   return unless $dl;
+   my $fulltext = $dl->{'fulltext'};
+   return 0 unless $fulltext;
+
+   my ( $ts ) = $fulltext =~ m/^$s$/m;
+   return 0 unless $ts;
+
+   $dl->{'ts'} = [ parse_innodb_timestamp( $ts ) ];
+   $dl->{'timestring'} = ts_to_string($dl->{'ts'});
+   $dl->{'txns'} = {};
+
+   my @sections
+      = $fulltext
+      =~ m{
+         ^\*{3}\s([^\n]*)  # *** (1) WAITING FOR THIS...
+         (.*?)             # Followed by anything, non-greedy
+         (?=(?:^\*{3})|\z) # Followed by another three stars or EOF
+      }gmsx;
+
+
+   # Loop through each section.  There are no assumptions about how many
+   # there are, who holds and wants what locks, and who gets rolled back.
+   while ( my ($header, $body) = splice(@sections, 0, 2) ) {
+      my ( $txn_id, $what ) = $header =~ m/^\($d\) (.*):$/;
+      next unless $txn_id;
+      $dl->{'txns'}->{$txn_id} ||= {};
+      my $txn = $dl->{'txns'}->{$txn_id};
+
+      if ( $what eq 'TRANSACTION' ) {
+         $txn->{'tx'} = parse_tx_text( $body, $complete, $debug, $full );
+      }
+      else {
+         push @{$txn->{'locks'}}, parse_innodb_record_locks( $body, $complete, $debug, $full );
+      }
+   }
+
+   @{ $dl }{ qw(rolled_back) }
+      = $fulltext =~ m/^\*\*\* WE ROLL BACK TRANSACTION \($d\)$/m;
+
+   # Make sure certain values aren't undef
+   map { $dl->{$_} ||= '' } qw(rolled_back);
+
+   delete $dl->{'fulltext'} unless $debug;
+   return 1;
+}
+
+sub parse_innodb_record_locks {
+   my ( $text, $complete, $debug, $full ) = @_;
+   my @result;
+
+   foreach my $lock ( $text =~ m/(^(?:RECORD|TABLE) LOCKS?.*$)/gm ) {
+      my $hash = {};
+      @{$hash}{ qw(lock_type space_id page_no n_bits index db table txn_id lock_mode) }
+         = $lock
+         =~ m{^(RECORD|TABLE) LOCKS? (?:space id $d page no $d n bits $d index `?$n`? of )?table `$n(?:/|`\.`)$n` trx id $t lock.mode (\S+)}m;
+      ( $hash->{'special'} )
+         = $lock =~ m/^(?:RECORD|TABLE) .*? locks (rec but not gap|gap before rec)/m;
+      $hash->{'insert_intention'}
+         = $lock =~ m/^(?:RECORD|TABLE) .*? insert intention/m ? 1 : 0;
+      $hash->{'waiting'}
+         = $lock =~ m/^(?:RECORD|TABLE) .*? waiting/m ? 1 : 0;
+
+      # Some things may not be in the text, so make sure they are not
+      # undef.
+      map { $hash->{$_} ||= 0 } qw(n_bits page_no space_id);
+      map { $hash->{$_} ||= "" } qw(index special);
+      push @result, $hash;
+   }
+
+   return @result;
+}
+
+sub parse_tx_text {
+   my ( $txn, $complete, $debug, $full ) = @_;
+
+   my ( $txn_id, $txn_status, $active_secs, $proc_no, $os_thread_id )
+      = $txn
+      =~ m/^(?:---)?TRANSACTION $t, (\D*?)(?: $d sec)?, (?:process no $d, )?OS thread id $d/m;
+   my ( $thread_status, $thread_decl_inside )
+      = $txn
+      =~ m/OS thread id \d+(?: ([^,]+?))?(?:, thread declared inside InnoDB $d)?$/m;
+
+   # Parsing the line that begins 'MySQL thread id' is complicated.  The only
+   # thing always in the line is the thread and query id.  See function
+   # innobase_mysql_print_thd in InnoDB source file sql/ha_innodb.cc.
+   my ( $thread_line ) = $txn =~ m/^(MySQL thread id .*)$/m;
+   my ( $mysql_thread_id, $query_id, $hostname, $ip, $user, $query_status );
+
+   if ( $thread_line ) {
+      # These parts can always be gotten.
+      ( $mysql_thread_id, $query_id ) = $thread_line =~ m/^MySQL thread id $d, query id $d/m;
+
+      # If it's a master/slave thread, "Has (read|sent) all" may be the thread's
+      # proc_info.  In these cases, there won't be any host/ip/user info
+      ( $query_status ) = $thread_line =~ m/(Has (?:read|sent) all .*$)/m;
+      if ( defined($query_status) ) {
+         $user = 'system user';
+      }
+
+      # It may be the case that the query id is the last thing in the line.
+      elsif ( $thread_line =~ m/query id \d+ / ) {
+         # The IP address is the only non-word thing left, so it's the most
+         # useful marker for where I have to start guessing.
+         ( $hostname, $ip ) = $thread_line =~ m/query id \d+(?: ([A-Za-z]\S+))? $i/m;
+         if ( defined $ip ) {
+            ( $user, $query_status ) = $thread_line =~ m/$ip $w(?: (.*))?$/;
+         }
+         else { # OK, there wasn't an IP address.
+            # There might not be ANYTHING except the query status.
+            ( $query_status ) = $thread_line =~ m/query id \d+ (.*)$/;
+            if ( $query_status !~ m/^\w+ing/ && !exists($is_proc_info{$query_status}) ) {
+               # The remaining tokens are, in order: hostname, user, query_status.
+               # It's basically impossible to know which is which.
+               ( $hostname, $user, $query_status ) = $thread_line
+                  =~ m/query id \d+(?: ([A-Za-z]\S+))?(?: $w(?: (.*))?)?$/m;
+            }
+            else {
+               $user = 'system user';
+            }
+         }
+      }
+   }
+
+   my ( $lock_wait_status, $lock_structs, $heap_size, $row_locks, $undo_log_entries )
+      = $txn
+      =~ m/^(?:(\D*) )?$d lock struct\(s\), heap size $d(?:, $d row lock\(s\))?(?:, undo log entries $d)?$/m;
+   my ( $lock_wait_time )
+      = $txn
+      =~ m/^------- TRX HAS BEEN WAITING $d SEC/m;
+
+   my $locks;
+   # If the transaction has locks, grab the locks.
+   if ( $txn =~ m/^TABLE LOCK|RECORD LOCKS/ ) {
+      $locks = [parse_innodb_record_locks($txn, $complete, $debug, $full)];
+   }
+   
+   my ( $tables_in_use, $tables_locked )
+      = $txn
+      =~ m/^mysql tables in use $d, locked $d$/m;
+   my ( $txn_doesnt_see_ge, $txn_sees_lt )
+      = $txn
+      =~ m/^Trx read view will not see trx with id >= $t, sees < $t$/m;
+   my $has_read_view = defined($txn_doesnt_see_ge);
+   # Only a certain number of bytes of the query text are included here, at least
+   # under some circumstances.  Some versions include 300, some 600.
+   my ( $query_text )
+      = $txn
+      =~ m{
+         ^MySQL\sthread\sid\s[^\n]+\n           # This comes before the query text
+         (.*?)                                  # The query text
+         (?=                                    # Followed by any of...
+            ^Trx\sread\sview
+            |^-------\sTRX\sHAS\sBEEN\sWAITING
+            |^TABLE\sLOCK
+            |^RECORD\sLOCKS\sspace\sid
+            |^(?:---)?TRANSACTION
+            |^\*\*\*\s\(\d\)
+            |\Z
+         )
+      }xms;
+   if ( $query_text ) {
+      $query_text =~ s/\s+$//;
+   }
+   else {
+      $query_text = '';
+   }
+
+   my %stuff = (
+      active_secs        => $active_secs,
+      has_read_view      => $has_read_view,
+      heap_size          => $heap_size,
+      hostname           => $hostname,
+      ip                 => $ip,
+      lock_structs       => $lock_structs,
+      lock_wait_status   => $lock_wait_status,
+      lock_wait_time     => $lock_wait_time,
+      mysql_thread_id    => $mysql_thread_id,
+      os_thread_id       => $os_thread_id,
+      proc_no            => $proc_no,
+      query_id           => $query_id,
+      query_status       => $query_status,
+      query_text         => $query_text,
+      row_locks          => $row_locks,
+      tables_in_use      => $tables_in_use,
+      tables_locked      => $tables_locked,
+      thread_decl_inside => $thread_decl_inside,
+      thread_status      => $thread_status,
+      txn_doesnt_see_ge  => $txn_doesnt_see_ge,
+      txn_id             => $txn_id,
+      txn_sees_lt        => $txn_sees_lt,
+      txn_status         => $txn_status,
+      undo_log_entries   => $undo_log_entries,
+      user               => $user,
+   );
+   $stuff{'fulltext'} = $txn if $debug;
+   $stuff{'locks'} = $locks if $locks;
+
+   # Some things may not be in the txn text, so make sure they are not
+   # undef.
+   map { $stuff{$_} ||= 0 } qw(active_secs heap_size lock_structs
+         tables_in_use undo_log_entries tables_locked has_read_view
+         thread_decl_inside lock_wait_time proc_no row_locks);
+   map { $stuff{$_} ||= "" } qw(thread_status txn_doesnt_see_ge
+         txn_sees_lt query_status ip query_text lock_wait_status user);
+   $stuff{'hostname'} ||= $stuff{'ip'};
+
+   return \%stuff;
+}
+
+sub parse_tx_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return unless $section && $section->{'fulltext'};
+   my $fulltext = $section->{'fulltext'};
+   $section->{'transactions'} = [];
+
+   # Handle the individual transactions
+   my @transactions = $fulltext =~ m/(---TRANSACTION \d.*?)(?=\n---TRANSACTION|$)/gs;
+   foreach my $txn ( @transactions ) {
+      my $stuff = parse_tx_text( $txn, $complete, $debug, $full );
+      delete $stuff->{'fulltext'} unless $debug;
+      push @{$section->{'transactions'}}, $stuff;
+   }
+
+   # Handle the general info
+   @{$section}{ 'trx_id_counter' }
+      = $fulltext =~ m/^Trx id counter $t$/m;
+   @{$section}{ 'purge_done_for', 'purge_undo_for' }
+      = $fulltext =~ m/^Purge done for trx's n:o < $t undo n:o < $t$/m;
+   @{$section}{ 'history_list_len' } # This isn't present in some 4.x versions
+      = $fulltext =~ m/^History list length $d$/m;
+   @{$section}{ 'num_lock_structs' }
+      = $fulltext =~ m/^Total number of lock structs in row lock hash table $d$/m;
+   @{$section}{ 'is_truncated' }
+      = $fulltext =~ m/^\.\.\. truncated\.\.\.$/m ? 1 : 0;
+
+   # Fill in things that might not be present
+   foreach ( qw(history_list_len) ) {
+      $section->{$_} ||= 0;
+   }
+
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+# I've read the source for this section.
+sub parse_ro_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return unless $section && $section->{'fulltext'};
+   my $fulltext = $section->{'fulltext'};
+
+   # Grab the info
+   @{$section}{ 'queries_inside', 'queries_in_queue' }
+      = $fulltext =~ m/^$d queries inside InnoDB, $d queries in queue$/m;
+   ( $section->{ 'read_views_open' } )
+      = $fulltext =~ m/^$d read views open inside InnoDB$/m;
+   ( $section->{ 'n_reserved_extents' } )
+      = $fulltext =~ m/^$d tablespace extents now reserved for B-tree/m;
+   @{$section}{ 'main_thread_proc_no', 'main_thread_id', 'main_thread_state' }
+      = $fulltext =~ m/^Main thread (?:process no. $d, )?id $d, state: (.*)$/m;
+   @{$section}{ 'num_rows_ins', 'num_rows_upd', 'num_rows_del', 'num_rows_read' }
+      = $fulltext =~ m/^Number of rows inserted $d, updated $d, deleted $d, read $d$/m;
+   @{$section}{ 'ins_sec', 'upd_sec', 'del_sec', 'read_sec' }
+      = $fulltext =~ m#^$f inserts/s, $f updates/s, $f deletes/s, $f reads/s$#m;
+   $section->{'main_thread_proc_no'} ||= 0;
+
+   map { $section->{$_} ||= 0 } qw(read_views_open n_reserved_extents);
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+sub parse_lg_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return unless $section;
+   my $fulltext = $section->{'fulltext'};
+
+   # Grab the info
+   ( $section->{ 'log_seq_no' } )
+      = $fulltext =~ m/Log sequence number \s*(\d.*)$/m;
+   ( $section->{ 'log_flushed_to' } )
+      = $fulltext =~ m/Log flushed up to \s*(\d.*)$/m;
+   ( $section->{ 'last_chkp' } )
+      = $fulltext =~ m/Last checkpoint at \s*(\d.*)$/m;
+   @{$section}{ 'pending_log_writes', 'pending_chkp_writes' }
+      = $fulltext =~ m/$d pending log writes, $d pending chkp writes/;
+   @{$section}{ 'log_ios_done', 'log_ios_s' }
+      = $fulltext =~ m#$d log i/o's done, $f log i/o's/second#;
+
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+sub parse_ib_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return unless $section && $section->{'fulltext'};
+   my $fulltext = $section->{'fulltext'};
+
+   # Some servers will output ibuf information for tablespace 0, as though there
+   # might be many tablespaces with insert buffers.  (In practice I believe
+   # the source code shows there will only ever be one).  I have to parse both
+   # cases here, but I assume there will only be one.
+   @{$section}{ 'size', 'free_list_len', 'seg_size' }
+      = $fulltext =~ m/^Ibuf(?: for space 0)?: size $d, free list len $d, seg size $d,$/m;
+   @{$section}{ 'inserts', 'merged_recs', 'merges' }
+      = $fulltext =~ m/^$d inserts, $d merged recs, $d merges$/m;
+
+   @{$section}{ 'hash_table_size', 'used_cells', 'bufs_in_node_heap' }
+      = $fulltext =~ m/^Hash table size $d, used cells $d, node heap has $d buffer\(s\)$/m;
+   @{$section}{ 'hash_searches_s', 'non_hash_searches_s' }
+      = $fulltext =~ m{^$f hash searches/s, $f non-hash searches/s$}m;
+
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+sub parse_wait_array {
+   my ( $text, $complete, $debug, $full ) = @_;
+   my %result;
+
+   @result{ qw(thread waited_at_filename waited_at_line waited_secs) }
+      = $text =~ m/^--Thread $d has waited at $fl for $f seconds/m;
+
+   # Depending on whether it's a SYNC_MUTEX,RW_LOCK_EX,RW_LOCK_SHARED,
+   # there will be different text output
+   if ( $text =~ m/^Mutex at/m ) {
+      $result{'request_type'} = 'M';
+      @result{ qw( lock_mem_addr lock_cfile_name lock_cline lock_var) }
+         = $text =~ m/^Mutex at $h created file $fl, lock var $d$/m;
+      @result{ qw( waiters_flag )}
+         = $text =~ m/^waiters flag $d$/m;
+   }
+   else {
+      @result{ qw( request_type lock_mem_addr lock_cfile_name lock_cline) }
+         = $text =~ m/^(.)-lock on RW-latch at $h created in file $fl$/m;
+      @result{ qw( writer_thread writer_lock_mode ) }
+         = $text =~ m/^a writer \(thread id $d\) has reserved it in mode  (.*)$/m;
+      @result{ qw( num_readers waiters_flag )}
+         = $text =~ m/^number of readers $d, waiters flag $d$/m;
+      @result{ qw(last_s_file_name last_s_line ) }
+         = $text =~ m/Last time read locked in file $fl$/m;
+      @result{ qw(last_x_file_name last_x_line ) }
+         = $text =~ m/Last time write locked in file $fl$/m;
+   }
+
+   $result{'cell_waiting'} = $text =~ m/^wait has ended$/m ? 0 : 1;
+   $result{'cell_event_set'} = $text =~ m/^wait is ending$/m ? 1 : 0;
+
+   # Because there are two code paths, some things won't get set.
+   map { $result{$_} ||= '' }
+      qw(last_s_file_name last_x_file_name writer_lock_mode);
+   map { $result{$_} ||= 0 }
+      qw(num_readers lock_var last_s_line last_x_line writer_thread);
+
+   return \%result;
+}
+
+sub parse_sm_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return 0 unless $section && $section->{'fulltext'};
+   my $fulltext = $section->{'fulltext'};
+
+   # Grab the info
+   @{$section}{ 'reservation_count', 'signal_count' }
+      = $fulltext =~ m/^OS WAIT ARRAY INFO: reservation count $d, signal count $d$/m;
+   @{$section}{ 'mutex_spin_waits', 'mutex_spin_rounds', 'mutex_os_waits' }
+      = $fulltext =~ m/^Mutex spin waits $d, rounds $d, OS waits $d$/m;
+   @{$section}{ 'rw_shared_spins', 'rw_shared_os_waits', 'rw_excl_spins', 'rw_excl_os_waits' }
+      = $fulltext =~ m/^RW-shared spins $d, OS waits $d; RW-excl spins $d, OS waits $d$/m;
+
+   # Look for info on waits.
+   my @waits = $fulltext =~ m/^(--Thread.*?)^(?=Mutex spin|--Thread)/gms;
+   $section->{'waits'} = [ map { parse_wait_array($_, $complete, $debug) } @waits ];
+   $section->{'wait_array_size'} = scalar(@waits);
+
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+# I've read the source for this section.
+sub parse_bp_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return unless $section && $section->{'fulltext'};
+   my $fulltext = $section->{'fulltext'};
+
+   # Grab the info
+   @{$section}{ 'total_mem_alloc', 'add_pool_alloc' }
+      = $fulltext =~ m/^Total memory allocated $d; in additional pool allocated $d$/m;
+   @{$section}{'dict_mem_alloc'}     = $fulltext =~ m/Dictionary memory allocated $d/;
+   @{$section}{'awe_mem_alloc'}      = $fulltext =~ m/$d MB of AWE memory/;
+   @{$section}{'buf_pool_size'}      = $fulltext =~ m/^Buffer pool size\s*$d$/m;
+   @{$section}{'buf_free'}           = $fulltext =~ m/^Free buffers\s*$d$/m;
+   @{$section}{'pages_total'}        = $fulltext =~ m/^Database pages\s*$d$/m;
+   @{$section}{'pages_modified'}     = $fulltext =~ m/^Modified db pages\s*$d$/m;
+   @{$section}{'pages_read', 'pages_created', 'pages_written'}
+      = $fulltext =~ m/^Pages read $d, created $d, written $d$/m;
+   @{$section}{'page_reads_sec', 'page_creates_sec', 'page_writes_sec'}
+      = $fulltext =~ m{^$f reads/s, $f creates/s, $f writes/s$}m;
+   @{$section}{'buf_pool_hits', 'buf_pool_reads'}
+      = $fulltext =~ m{Buffer pool hit rate $d / $d$}m;
+   if ($fulltext =~ m/^No buffer pool page gets since the last printout$/m) {
+      @{$section}{'buf_pool_hits', 'buf_pool_reads'} = (0, 0);
+      @{$section}{'buf_pool_hit_rate'} = '--';
+   }
+   else {
+      @{$section}{'buf_pool_hit_rate'}
+         = $fulltext =~ m{Buffer pool hit rate (\d+ / \d+)$}m;
+   }
+   @{$section}{'reads_pending'} = $fulltext =~ m/^Pending reads $d/m;
+   @{$section}{'writes_pending_lru', 'writes_pending_flush_list', 'writes_pending_single_page' }
+      = $fulltext =~ m/^Pending writes: LRU $d, flush list $d, single page $d$/m;
+
+   map { $section->{$_} ||= 0 }
+      qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page
+      awe_mem_alloc dict_mem_alloc);
+   @{$section}{'writes_pending'} = List::Util::sum(
+      @{$section}{ qw(writes_pending_lru writes_pending_flush_list writes_pending_single_page) });
+
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+# I've read the source for this.
+sub parse_io_section {
+   my ( $section, $complete, $debug, $full ) = @_;
+   return unless $section && $section->{'fulltext'};
+   my $fulltext = $section->{'fulltext'};
+   $section->{'threads'} = {};
+
+   # Grab the I/O thread info
+   my @threads = $fulltext =~ m<^(I/O thread \d+ .*)$>gm;
+   foreach my $thread (@threads) {
+      my ( $tid, $state, $purpose, $event_set )
+         = $thread =~ m{I/O thread $d state: (.+?) \((.*)\)(?: ev set)?$}m;
+      if ( defined $tid ) {
+         $section->{'threads'}->{$tid} = {
+            thread    => $tid,
+            state     => $state,
+            purpose   => $purpose,
+            event_set => $event_set ? 1 : 0,
+         };
+      }
+   }
+
+   # Grab the reads/writes/flushes info
+   @{$section}{ 'pending_normal_aio_reads', 'pending_aio_writes' }
+      = $fulltext =~ m/^Pending normal aio reads: $d, aio writes: $d,$/m;
+   @{$section}{ 'pending_ibuf_aio_reads', 'pending_log_ios', 'pending_sync_ios' }
+      = $fulltext =~ m{^ ibuf aio reads: $d, log i/o's: $d, sync i/o's: $d$}m;
+   @{$section}{ 'flush_type', 'pending_log_flushes', 'pending_buffer_pool_flushes' }
+      = $fulltext =~ m/^Pending flushes \($w\) log: $d; buffer pool: $d$/m;
+   @{$section}{ 'os_file_reads', 'os_file_writes', 'os_fsyncs' }
+      = $fulltext =~ m/^$d OS file reads, $d OS file writes, $d OS fsyncs$/m;
+   @{$section}{ 'reads_s', 'avg_bytes_s', 'writes_s', 'fsyncs_s' }
+      = $fulltext =~ m{^$f reads/s, $d avg bytes/read, $f writes/s, $f fsyncs/s$}m;
+   @{$section}{ 'pending_preads', 'pending_pwrites' }
+      = $fulltext =~ m/$d pending preads, $d pending pwrites$/m;
+   @{$section}{ 'pending_preads', 'pending_pwrites' } = (0, 0)
+      unless defined($section->{'pending_preads'});
+
+   delete $section->{'fulltext'} unless $debug;
+   return 1;
+}
+
+sub _debug {
+   my ( $debug, $msg ) = @_;
+   if ( $debug ) {
+      die $msg;
+   }
+   else {
+      warn $msg;
+   }
+   return 1;
+}
+
+1;
+
+# end_of_package
+# ############################################################################
+# Perldoc section.  I put this last as per the Dog book.
+# ############################################################################
+=pod
+
+=head1 NAME
+
+InnoDBParser - Parse InnoDB monitor text.
+
+=head1 DESCRIPTION
+
+InnoDBParser tries to parse the output of the InnoDB monitor.  One way to get
+this output is to connect to a MySQL server and issue the command SHOW ENGINE
+INNODB STATUS (omit 'ENGINE' on earlier versions of MySQL).  The goal is to
+turn text into data that something else (e.g. innotop) can use.
+
+The output comes from all over, but the place to start in the source is
+innobase/srv/srv0srv.c.
+
+=head1 SYNOPSIS
+
+   use InnoDBParser;
+   use DBI;
+
+   # Get the status text.
+   my $dbh = DBI->connect(
+      "DBI::mysql:test;host=localhost",
+      'user',
+      'password'
+   );
+   my $query = 'SHOW /*!5 ENGINE */ INNODB STATUS';
+   my $text  = $dbh->selectcol_arrayref($query)->[0];
+
+   # 1 or 0
+   my $debug = 1;
+
+   # Choose sections of the monitor text you want.  Possible values:
+   # TRANSACTIONS                          => tx
+   # BUFFER POOL AND MEMORY                => bp
+   # SEMAPHORES                            => sm
+   # LOG                                   => lg
+   # ROW OPERATIONS                        => ro
+   # INSERT BUFFER AND ADAPTIVE HASH INDEX => ib
+   # FILE I/O                              => io
+   # LATEST DETECTED DEADLOCK              => dl
+   # LATEST FOREIGN KEY ERROR              => fk
+
+   my $required_sections = {
+      tx => 1,
+   };
+
+   # Parse the status text.
+   my $parser = InnoDBParser->new;
+   $innodb_status = $parser->parse_status_text(
+      $text,
+      $debug,
+      # Omit the following parameter to get all sections.
+      $required_sections,
+   );
+
+=head1 COPYRIGHT, LICENSE AND WARRANTY
+
+This package is copyright (c) 2006 Baron Schwartz, baron at xaprb dot com.
+Feedback and improvements are gratefully received.
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2; OR the Perl Artistic License.  On UNIX and similar
+systems, you can issue `man perlgpl' or `man perlartistic' to read these
+licenses.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA  02111-1307  USA
+
+=head1 AUTHOR
+
+Baron Schwartz, baron at xaprb dot com.
+
+=head1 BUGS
+
+None known, but I bet there are some.  The InnoDB monitor text wasn't really
+designed to be parsable.
+
+=head1 SEE ALSO
+
+innotop - a program that can format the parsed status information for humans
+to read and enjoy.
+
+=cut

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/changelog.innotop
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/changelog.innotop	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/changelog.innotop	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,318 @@
+Changelog for innotop and InnoDBParser:
+
+2007-11-09: version 1.6.0
+
+   * S mode crashed on non-numeric values.
+   * New user-defined columns crashed upon restart.
+   * Added --color option to control terminal coloring.
+
+2007-09-18: version 1.5.2
+
+   * Added the ability to monitor InnoDB status from a file.
+   * Changed W mode to L mode; it monitors all locks, not just lock waits.
+
+2007-09-16: version 1.5.1
+
+   * Added C (Command Summary) mode.
+   * Fixed a bug in the 'avg' aggregate function.
+
+2007-09-10: version 1.5.0
+
+   Changes:
+   * Added plugin functionality.
+   * Added group-by functionality.
+   * Moved the configuration file to a directory.
+   * Enhanced filtering and sorting on pivoted tables.
+   * Many small bug fixes.
+
+2007-07-16: version 1.4.3
+
+   Changes:
+   * Added standard --version command-line option
+   * Changed colors to cyan instead of blue; more visible on dark terminals.
+   * Added information to the filter-choosing dialog.
+   * Added column auto-completion when entering a filter expression.
+   * Changed Term::ReadKey from optional to mandatory.
+   * Clarified username in password prompting.
+   * Ten thousand words of documentation!
+
+   Bugs fixed:
+   * innotop crashed in W mode when InnoDB status data was truncated.
+   * innotop didn't display errors in tables if debug was enabled.
+   * The colored() subroutine wasn't being created in non-interactive mode.
+   * Don't prompt to save password except the first time.
+
+2007-05-03: version 1.4.2
+
+   This version contains all changes to the trunk until revision 239; some
+   changes in revisions 240:250 are included.
+
+   MAJOR CHANGES:
+
+   * Quick-filters to easily filter any column in any display
+   * Compatibility with MySQL 3.23 through 6.0
+   * Improved error handling when a server is down, permissions denied, etc
+   * Use additional SHOW INNODB STATUS information in 5.1.x
+   * Make all modes use tables consistently, so they can all be edited,
+     filtered, colored and sorted consistently
+   * Combine V, G and S modes into S mode, with v, g, and s hot-keys
+   * Let DBD driver read MySQL option files; permit connections without
+     user/pass/etc
+   * Compile SQL-like expressions into Perl subroutines; eliminate need to
+     know Perl
+   * Do not save all config data to config file, only save user's customizations
+   * Rewritten and improved command-line option handling
+   * Added --count, --delay, and other command-line options to support
+     run-and-exit operation
+   * Improve built-in variable sets
+   * Improve help screen with three-part balanced-column layout
+   * Simplify table-editor and improve hotkey support
+   * Require Perl to have high-resolution time support (Time::HiRes)
+   * Help the user choose a query to analyze or kill
+   * Enable EXPLAIN, show-full-query in T mode just like Q mode
+   * Let data-extraction access current, previous and incremental data sets
+     all at once
+
+   MINOR CHANGES:
+
+   * Column stabilizing for Q mode
+   * New color rules for T, Q, W modes
+   * Apply slave I/O filter to Q mode
+   * Improve detection of server version and other meta-data
+   * Make connection timeout a config variable
+   * Improve cross-version-compatible SQL syntax
+   * Get some information from the DBD driver instead of asking MySQL for it
+   * Improved error messages
+   * Improve server group creation/editing
+   * Improve connection/thread killing
+   * Fix broken key bindings and restore previously mapped hot-keys for
+     choosing columns
+   * Some documentation updates (but not nearly enough)
+   * Allow the user to specify graphing char in S mode (formerly G mode)
+   * Allow easy switching between variable sets in S mode
+   * Bind 'n' key globally to choose the 'next' server connection
+   * Bind '%' key globally to filter displayed tables
+   * Allow aligning columns on the decimal place for easy readability
+   * Add hide_hdr config variable to hide column headers in tables
+   * Add a feature to smartly run PURGE MASTER LOGS in Replication mode
+   * Enable debug mode as a globally configurable variable
+   * Improve error messages when an expression or filter doesn't compile or has
+     a run-time error; die on error when debug is enabled
+   * Allow user-configurable delays after executing SQL (to let the server
+     settle down before taking another measurement)
+   * Add an expression to show how long until a transaction is finished
+   * Add skip_innodb as a global config variable
+   * Add '%' after percentages to help disambiguate (user-configurable)
+   * Add column to M mode to help see how fast slave is catching up to master
+
+   BUG FIXES:
+
+   * T and W modes had wrong value for wait_status column
+   * Error tracking on connections didn't reset when the connection recovered
+   * wait_timeout on connections couldn't be set before MySQL 4.0.3
+   * There was a crash on 3.23 when wiping deadlocks
+   * Lettercase changes in some result sets (SHOW MASTER/SLAVE STATUS) between
+     MySQL versions crashed innotop
+   * Inactive connections crashed innotop upon access to DBD driver
+   * set_precision did not respect user defaults for number of digits
+   * --inc command-line option could not be negated
+   * InnoDB status parsing was not always parsing all needed information
+   * S mode (formerly G mode) could crash trying to divide non-numeric data
+   * M table didn't show Slave_open_temp_tables variable; incorrect lettercase
+   * DBD drivers with broken AutoCommit would crash innotop
+   * Some key bindings had incorrect labels
+   * Some config-file loading routines could load data for things that didn't
+     exist
+   * Headers printed too often in S mode
+   * High-resolution time was not used even when the user had it
+   * Non-interactive mode printed blank lines sometimes
+   * Q-mode header and statusbar showed different QPS numbers
+   * Formulas for key-cache and query-cache hit ratios were wrong
+   * Mac OS "Darwin" machines were mis-identified as Microsoft Windows
+   * Some multiplications crashed when given undefined input
+   * The commify transformation did not check its input and could crash
+   * Specifying an invalid mode on the command line or config file could crash
+     innotop
+
+2007-03-29: version 1.4.1
+
+   * More tweaks to display of connection errors.
+   * Fixed a problem with skip-innodb in MySQL 5.1.
+   * Fix a bug with dead connections in single-connection mode.
+   * Fix a regex to allow parsing more data from truncated deadlocks.
+   * Don't load active cxns from the config file if the cxn isn't defined.
+
+2007-03-03: version 1.4.0
+
+   * Further tweak error handling and display of connection errors
+   * More centralization of querying
+   * Fix forking so it doesn't kill all database connections
+   * Allow user to run innotop without permissions for GLOBAL variables and status
+
+2007-02-11: version 1.3.6
+
+   * Handle some connection failures so innotop doesn't crash because of one server.
+   * Enable incremental display in more modes.
+   * Tweaks to colorizing, color editor, and default color rules.
+   * Tweaks to default sorting rules.
+   * Use prepared statements for efficiency.
+   * Bug fixes and code cleanups.
+   * Data storage is keyed on clock ticks now.
+
+2007-02-03: version 1.3.5
+
+   * Bug fixes.
+   * More tools for editing configuration from within innotop.
+   * Filters and transformations are constrained to valid values.
+   * Support for colorizing rows.
+   * Sorting by multiple columns.
+   * Compress headers when display is very wide.
+   * Stabilize and limit column widths.
+   * Check config file formats when upgrading so upgrades go smoothly.
+   * Make D mode handle many connections at once.
+   * Extract simple expressions from data sets in column src property.
+     This makes innotop more awk-ish.
+
+2007-01-16: version 1.3
+
+   * Readline support.
+   * Can be used unattended, or in a pipe-and-filter mode
+     where it outputs tab-separated data to standard output.
+   * You can specify a config file on the command line.
+     Config files can be marked read-only.
+   * Monitor multiple servers simultaneously.
+   * Server groups to help manage many servers conveniently.
+   * Monitor master/slave status, and control slaves.
+   * Columns can have user-defined expressions as their data sources.
+   * Better configuration tools.
+   * InnoDB status information is merged into SHOW VARIABLES and
+     SHOW STATUS information, so you can access it all together.
+   * High-precision time support in more places.
+   * Lots of tweaks to make things display more readably and compactly.
+   * Column transformations and filters.
+
+2007-01-16: version 1.0.1
+   * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS.
+     The new project homepage is http://sourceforge.net/projects/innotop/
+   * Tweak default T/Q mode sort columns to match what people expect.
+   * Fix broken InnoDBParser.pm documentation (and hence man page).
+
+2007-01-06: version 1.0
+   * NOTE: innotop is now hosted at Sourceforge, in Subversion not CVS.
+     The new project homepage is http://sourceforge.net/projects/innotop/
+   * Prevent control characters from freaking terminal out.
+   * Set timeout to keep busy servers from closing connection.
+   * There is only one InnoDB insert buffer.
+   * Make licenses clear and consistent.
+
+2006-11-14: innotop 0.1.160, InnoDBParser version 1.69
+   * Support for ANSI color on Microsoft Windows (more readable, compact
+     display; thanks Gisbert W. Selke).
+   * Better handling of $ENV{HOME} on Windows.
+   * Added a LICENSE file to the package as per Gentoo bug:
+     http://bugs.gentoo.org/show_bug.cgi?id=147600
+
+2006-11-11: innotop 0.1.157, InnoDBParser version 1.69
+   * Add Microsoft Windows support.
+
+2006-10-19: innotop 0.1.154, InnoDBParser version 1.69
+   * Add O (Open Tables) mode
+   * Add some more checks to handle incomplete InnoDB status information
+
+2006-09-30: innotop 0.1.152, InnoDBParser version 1.69
+   * Figured out what was wrong with package $VERSION variable: it wasn't
+     after the package declaration!
+
+2006-09-28: innotop 0.1.152, InnoDBParser version 1.67
+   * Make more efforts towards crash-resistance and tolerance of completely
+     messed-up inputs.  If innotop itself is broken, it is now much harder to
+     tell, because it just keeps on running without complaining.
+   * Fix a small bug parsing out some information and displaying it.
+
+2006-09-05: innotop 0.1.149, InnoDBParser version 1.64
+   * Try to find and eliminate any parsing code that assumes pattern matches
+     will succeed.
+
+2006-09-05: innotop 0.1.149, InnoDBParser version 1.62
+   * Make innotop crash-resistant, so I can declare it STABLE finally.
+   * Instead of using SQL conditional comments, detect MySQL version.
+
+2006-08-22: innotop 0.1.147, InnoDBParser version 1.60
+   * Fix some innotop bugs with undefined values, bad formatting etc.
+
+2006-08-19: innotop 0.1.146, InnoDBParser version 1.60
+   * Make innotop handle some unexpected NULL values in Q mode.
+   * Add OS wait information to W mode, so it is now "everything that waits."
+   * Center section captions better.
+   * Make R mode more readable and compact.
+   * Make InnoDBParser parse lock waits even when they've been waiting 0 secs.
+
+2006-08-12: innotop 0.1.139, InnoDBParser version 1.59
+   * Add more documentation
+   * Tweak V mode to show more info in less space.
+   * Fix a bug in G mode.
+
+2006-08-10: innotop 0.1.132, InnoDBParser version 1.58
+   * Handle yet more types of FK error... it will never end!
+   * Handle some special cases when DEADLOCK info truncated
+   * Add a bit more FK info to F mode in innotop
+   * More tests added to the test suite
+
+2006-08-07: innotop 0.1.131, InnoDBParser version 1.55
+   * Fix another issue with configuration
+   * Handle another type of FK error
+
+2006-08-03: innotop 0.1.130, InnoDBParser version 1.54
+   * Fix an issue loading config file
+   * Add heap_no to 'D' (InnoDB Deadlock) mode to ease deadlock debugging.
+
+2006-08-02: innotop 0.1.128, InnoDBParser version 1.54
+   * Parse lock wait information from the TRANSACTION section.
+   * Even more OS-specific parsing... pain in the butt...
+   * Add 'W' (InnoDB Lock Wait) mode.
+   * Fix some minor display issues with statusbar.
+
+2006-08-02: innotop 0.1.125, InnoDBParser version 1.50
+   * Don't try to get references to Perl built-in functions like time()
+   * Handle more OS-specific variations of InnoDB status text
+   * Add some more information to various places in innotop
+
+2006-08-01: innotop 0.1.123, InnoDBParser version 1.47
+
+   * Enhance S and G modes: clear screen and re-print headers
+   * Don't crash when deadlock data is truncated
+   * Make Analyze mode say how to get back to whatever you came from
+   * Display 'nothing to display' when there is nothing
+   * Add ability to read InnoDB status text from a file (mostly helps test)
+   * Add table of Wait Array Information in Row Op/Semaphore mode
+   * Add table of lock information in InnoDB deadlock mode
+   * Ensure new features in upgrades don't get masked by existing config files
+   * Tweak default column choices for T mode
+   * Enhance foreign key parsing
+   * Enhance physical record and data tuple parsing
+   * Enhance lock parsing (handle old-style and new-style formats)
+
+2006-07-24: innotop 0.1.112, InnoDBParser version 1.36
+
+   * InnoDBParser enhancements for FK error messages.
+   * A fix to innotop to prevent it from crashing while trying to display a FK
+     error message.
+   * Some minor cosmetic changes to number formatting in innotop.
+
+2006-07-22: innotop 0.1.106, InnoDBParser version 1.35
+
+   * InnoDBParser is much more complete and accurate.
+   * Tons of bug fixes.
+   * Add partitions to EXPLAIN mode.
+   * Enhance Q mode header, add T mode header.
+   * Share some configuration variables across modes.
+   * Add formatted time columns to Q, T modes.
+   * Add command-line argument parsing.
+   * Turn off echo when asking for password.
+   * Add option to specify port when connecting.
+   * Let display-optimized-query display multiple notes.
+   * Lots of small improvements, such as showing more info in statusbar.
+
+2006-07-02: innotop 0.1.74, InnoDBParser version 1.24
+
+   * Initial release for public consumption.

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,9485 @@
+#!/usr/bin/perl
+
+# vim: tw=160:nowrap:expandtab:tabstop=3:shiftwidth=3:softtabstop=3
+
+use strict;
+use warnings FATAL => 'all';
+use sigtrap qw(handler finish untrapped normal-signals);
+
+use Data::Dumper;
+use DBI;
+use English qw(-no_match_vars);
+use File::Basename qw(dirname);
+use Getopt::Long;
+use List::Util qw(max min maxstr sum);
+use InnoDBParser;
+use POSIX qw(ceil);
+use Time::HiRes qw(time sleep);
+use Term::ReadKey qw(ReadMode ReadKey);
+
+# Version, license and warranty information. {{{1
+# ###########################################################################
+our $VERSION = '1.6.0';
+our $SVN_REV = sprintf("%d", q$Revision: 383 $ =~ m/(\d+)/g);
+our $SVN_URL = sprintf("%s", q$URL: https://innotop.svn.sourceforge.net/svnroot/innotop/trunk/innotop $ =~ m$svnroot/innotop/(\S+)$g);
+
+my $innotop_license = <<"LICENSE";
+
+This is innotop version $VERSION, a MySQL and InnoDB monitor.
+
+This program is copyright (c) 2006 Baron Schwartz.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2; OR the Perl Artistic License.  On UNIX and similar
+systems, you can issue `man perlgpl' or `man perlartistic' to read these
+licenses.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA  02111-1307  USA.
+LICENSE
+
+# Configuration information and global setup {{{1
+# ###########################################################################
+
+# Really, really, super-global variables.
+my @config_versions = (
+   "000-000-000", "001-003-000", # config file was one big name-value hash.
+   "001-003-000", "001-004-002", # config file contained non-user-defined stuff.
+);
+
+my $clear_screen_sub;
+
+# This defines expected properties and defaults for the column definitions that
+# eventually end up in tbl_meta.
+my %col_props = (
+   hdr     => '',
+   just    => '-',
+   dec     => 0,     # Whether to align the column on the decimal point
+   num     => 0,
+   label   => '',
+   user    => 0,
+   src     => '',
+   tbl     => '',    # Helps when writing/reading custom columns in config files
+   minw    => 0,
+   maxw    => 0,
+   trans   => [],
+   agg     => 'first',  # Aggregate function
+   aggonly => 0,        # Whether to show only when tbl_meta->{aggregate} is true
+);
+
+# Actual DBI connections to MySQL servers.
+my %dbhs;
+
+# Command-line parameters {{{2
+# ###########################################################################
+
+my @opt_spec = (
+   { s => 'help',       d => 'Show this help message' },
+   { s => 'color|C!',   d => 'Use terminal coloring (default)',   c => 'color' },
+   { s => 'config|c=s', d => 'Config file to read' },
+   { s => 'nonint|n',   d => 'Non-interactive, output tab-separated fields' },
+   { s => 'count=i',    d => 'Number of updates before exiting' },
+   { s => 'delay|d=f',  d => 'Delay between updates in seconds',  c => 'interval' },
+   { s => 'mode|m=s',   d => 'Operating mode to start in',        c => 'mode' },
+   { s => 'inc|i!',     d => 'Measure incremental differences',   c => 'status_inc' },
+   { s => 'version',    d => 'Output version information and exit' },
+);
+
+# This is the container for the command-line options' values to be stored in
+# after processing.  Initial values are defaults.
+my %opts = (
+   n => !( -t STDIN && -t STDOUT ), # If in/out aren't to terminals, we're interactive
+);
+# Post-process...
+my %opt_seen;
+foreach my $spec ( @opt_spec ) {
+   my ( $long, $short ) = $spec->{s} =~ m/^(\w+)(?:\|([^!+=]*))?/;
+   $spec->{k} = $short || $long;
+   $spec->{l} = $long;
+   $spec->{t} = $short;
+   $spec->{n} = $spec->{s} =~ m/!/;
+   $opts{$spec->{k}} = undef unless defined $opts{$spec->{k}};
+   die "Duplicate option $spec->{k}" if $opt_seen{$spec->{k}}++;
+}
+
+Getopt::Long::Configure('no_ignore_case', 'bundling');
+GetOptions( map { $_->{s} => \$opts{$_->{k}} } @opt_spec) or $opts{help} = 1;
+
+if ( $opts{version} ) {
+   print "innotop  Ver $VERSION Changeset $SVN_REV from $SVN_URL\n";
+   exit(0);
+}
+
+if ( $opts{'help'} ) {
+   print "Usage: innotop <options> <innodb-status-file>\n\n";
+   my $maxw = max(map { length($_->{l}) + ($_->{n} ? 4 : 0)} @opt_spec);
+   foreach my $spec ( sort { $a->{l} cmp $b->{l} } @opt_spec ) {
+      my $long  = $spec->{n} ? "[no]$spec->{l}" : $spec->{l};
+      my $short = $spec->{t} ? "-$spec->{t}" : '';
+      printf("  --%-${maxw}s %-4s %s\n", $long, $short, $spec->{d});
+   }
+   print <<USAGE;
+
+innotop is a MySQL and InnoDB transaction/status monitor, like 'top' for
+MySQL.  It displays queries, InnoDB transactions, lock waits, deadlocks,
+foreign key errors, open tables, replication status, buffer information,
+row operations, logs, I/O operations, load graph, and more.  You can
+monitor many servers at once with innotop. 
+
+USAGE
+   exit(1);
+}
+
+# Meta-data (table definitions etc) {{{2
+# ###########################################################################
+
+# Expressions {{{3
+# Convenience so I can copy/paste these in several places...
+# ###########################################################################
+my %exprs = (
+   Host              => q{my $host = host || hostname || ''; ($host) = $host =~ m/^((?:[\d.]+(?=:))|(?:[a-zA-Z]\w+))/; return $host || ''},
+   Port              => q{my ($p) = host =~ m/:(.*)$/; return $p || 0},
+   OldVersions       => q{dulint_to_int(IB_tx_trx_id_counter) - dulint_to_int(IB_tx_purge_done_for)},
+   MaxTxnTime        => q/max(map{ $_->{active_secs} } @{ IB_tx_transactions }) || 0/,
+   NumTxns           => q{scalar @{ IB_tx_transactions } },
+   DirtyBufs         => q{ $cur->{IB_bp_pages_modified} / ($cur->{IB_bp_buf_pool_size} || 1) },
+   BufPoolFill       => q{ $cur->{IB_bp_pages_total} / ($cur->{IB_bp_buf_pool_size} || 1) },
+   ServerLoad        => q{ $cur->{Threads_connected}/(Questions||1)/Uptime_hires },
+   TxnTimeRemain     => q{ defined undo_log_entries && defined $pre->{undo_log_entries} && undo_log_entries < $pre->{undo_log_entries} ? undo_log_entries / (($pre->{undo_log_entries} - undo_log_entries)/((active_secs-$pre->{active_secs})||1))||1 : 0},
+   SlaveCatchupRate  => ' defined $cur->{seconds_behind_master} && defined $pre->{seconds_behind_master} && $cur->{seconds_behind_master} < $pre->{seconds_behind_master} ? ($pre->{seconds_behind_master}-$cur->{seconds_behind_master})/($cur->{Uptime_hires}-$pre->{Uptime_hires}) : 0',
+   QcacheHitRatio    => q{(Qcache_hits||0)/(((Com_select||0)+(Qcache_hits||0))||1)},
+);
+
+# ###########################################################################
+# Column definitions {{{3
+# Defines every column in every table. A named column has the following
+# properties:
+#    * hdr    Column header/title
+#    * label  Documentation for humans.
+#    * num    Whether it's numeric (for sorting).
+#    * just   Alignment; generated from num, user-overridable in tbl_meta
+#    * minw, maxw Auto-generated, user-overridable.
+# Values from this hash are just copied to tbl_meta, which is where everything
+# else in the program should read from.
+# ###########################################################################
+
+my %columns = (
+   active_secs                 => { hdr => 'SecsActive',          num => 1, label => 'Seconds transaction has been active', },
+   add_pool_alloc              => { hdr => 'Add\'l Pool',         num => 1, label => 'Additonal pool allocated' },
+   attempted_op                => { hdr => 'Action',              num => 0, label => 'The action that caused the error' },
+   awe_mem_alloc               => { hdr => 'AWE Memory',          num => 1, label => '[Windows] AWE memory allocated' },
+   binlog_cache_overflow       => { hdr => 'Binlog Cache',        num => 1, label => 'Transactions too big for binlog cache that went to disk' },
+   binlog_do_db                => { hdr => 'Binlog Do DB',        num => 0, label => 'binlog-do-db setting' },
+   binlog_ignore_db            => { hdr => 'Binlog Ignore DB',    num => 0, label => 'binlog-ignore-db setting' },
+   bps_in                      => { hdr => 'BpsIn',               num => 1, label => 'Bytes per second received by the server', },
+   bps_out                     => { hdr => 'BpsOut',              num => 1, label => 'Bytes per second sent by the server', },
+   buf_free                    => { hdr => 'Free Bufs',           num => 1, label => 'Buffers free in the buffer pool' },
+   buf_pool_hit_rate           => { hdr => 'Hit Rate',            num => 0, label => 'Buffer pool hit rate' },
+   buf_pool_hits               => { hdr => 'Hits',                num => 1, label => 'Buffer pool hits' },
+   buf_pool_reads              => { hdr => 'Reads',               num => 1, label => 'Buffer pool reads' },
+   buf_pool_size               => { hdr => 'Size',                num => 1, label => 'Buffer pool size' },
+   bufs_in_node_heap           => { hdr => 'Node Heap Bufs',      num => 1, label => 'Buffers in buffer pool node heap' },
+   bytes_behind_master         => { hdr => 'ByteLag',             num => 1, label => 'Bytes the slave lags the master in binlog' },
+   cell_event_set              => { hdr => 'Ending?',             num => 1, label => 'Whether the cell event is set' },
+   cell_waiting                => { hdr => 'Waiting?',            num => 1, label => 'Whether the cell is waiting' },
+   child_db                    => { hdr => 'Child DB',            num => 0, label => 'The database of the child table' },
+   child_index                 => { hdr => 'Child Index',         num => 0, label => 'The index in the child table' },
+   child_table                 => { hdr => 'Child Table',         num => 0, label => 'The child table' },
+   cmd                         => { hdr => 'Cmd',                 num => 0, label => 'Type of command being executed', },
+   cnt                         => { hdr => 'Cnt',                 num => 0, label => 'Count', agg => 'count', aggonly => 1 },
+   connect_retry               => { hdr => 'Connect Retry',       num => 1, label => 'Slave connect-retry timeout' },
+   cxn                         => { hdr => 'CXN',                 num => 0, label => 'Connection from which the data came', },
+   db                          => { hdr => 'DB',                  num => 0, label => 'Current database', },
+   dict_mem_alloc              => { hdr => 'Dict Mem',            num => 1, label => 'Dictionary memory allocated' },
+   dirty_bufs                  => { hdr => 'Dirty Buf',           num => 1, label => 'Dirty buffer pool pages' },
+   dl_txn_num                  => { hdr => 'Num',                 num => 0, label => 'Deadlocked transaction number', },
+   event_set                   => { hdr => 'Evt Set?',            num => 1, label => '[Win32] if a wait event is set', },
+   exec_master_log_pos         => { hdr => 'Exec Master Log Pos', num => 1, label => 'Exec Master Log Position' },
+   fk_name                     => { hdr => 'Constraint',          num => 0, label => 'The name of the FK constraint' },
+   free_list_len               => { hdr => 'Free List Len',       num => 1, label => 'Length of the free list' },
+   has_read_view               => { hdr => 'Rd View',             num => 1, label => 'Whether the transaction has a read view' },
+   hash_searches_s             => { hdr => 'Hash/Sec',            num => 1, label => 'Number of hash searches/sec' },
+   hash_table_size             => { hdr => 'Size',                num => 1, label => 'Number of non-hash searches/sec' },
+   heap_no                     => { hdr => 'Heap',                num => 1, label => 'Heap number' },
+   heap_size                   => { hdr => 'Heap',                num => 1, label => 'Heap size' },
+   history_list_len            => { hdr => 'History',             num => 1, label => 'History list length' },
+   host_and_domain             => { hdr => 'Host',                num => 0, label => 'Hostname/IP and domain' },
+   host_and_port               => { hdr => 'Host/IP',             num => 0, label => 'Hostname or IP address, and port number', },
+   hostname                    => { hdr => 'Host',                num => 0, label => 'Hostname' },
+   index                       => { hdr => 'Index',               num => 0, label => 'The index involved' },
+   index_ref                   => { hdr => 'Index Ref',           num => 0, label => 'Index referenced' },
+   info                        => { hdr => 'Query',               num => 0, label => 'Info or the current query', },
+   insert_intention            => { hdr => 'Ins Intent',          num => 1, label => 'Whether the thread was trying to insert' },
+   inserts                     => { hdr => 'Inserts',             num => 1, label => 'Inserts' },
+   io_bytes_s                  => { hdr => 'Bytes/Sec',           num => 1, label => 'Average I/O bytes/sec' },
+   io_flush_type               => { hdr => 'Flush Type',          num => 0, label => 'I/O Flush Type' },
+   io_fsyncs_s                 => { hdr => 'fsyncs/sec',          num => 1, label => 'I/O fsyncs/sec' },
+   io_reads_s                  => { hdr => 'Reads/Sec',           num => 1, label => 'Average I/O reads/sec' },
+   io_writes_s                 => { hdr => 'Writes/Sec',          num => 1, label => 'Average I/O writes/sec' },
+   ip                          => { hdr => 'IP',                  num => 0, label => 'IP address' },
+   is_name_locked              => { hdr => 'Locked',              num => 1, label => 'Whether table is name locked', },
+   key_buffer_hit              => { hdr => 'KCacheHit',           num => 1, label => 'Key cache hit ratio', },
+   key_len                     => { hdr => 'Key Length',          num => 1, label => 'Number of bytes used in the key' },
+   last_chkp                   => { hdr => 'Last Checkpoint',     num => 0, label => 'Last log checkpoint' },
+   last_errno                  => { hdr => 'Last Errno',          num => 1, label => 'Last error number' },
+   last_error                  => { hdr => 'Last Error',          num => 0, label => 'Last error' },
+   last_s_file_name            => { hdr => 'S-File',              num => 0, label => 'Filename where last read locked' },
+   last_s_line                 => { hdr => 'S-Line',              num => 1, label => 'Line where last read locked' },
+   last_x_file_name            => { hdr => 'X-File',              num => 0, label => 'Filename where last write locked' },
+   last_x_line                 => { hdr => 'X-Line',              num => 1, label => 'Line where last write locked' },
+   last_pct                    => { hdr => 'Pct',                 num => 1, label => 'Last Percentage' },
+   last_total                  => { hdr => 'Last Total',          num => 1, label => 'Last Total' },
+   last_value                  => { hdr => 'Last Incr',           num => 1, label => 'Last Value' },
+   load                        => { hdr => 'Load',                num => 1, label => 'Server load' },
+   lock_cfile_name             => { hdr => 'Crtd File',           num => 0, label => 'Filename where lock created' },
+   lock_cline                  => { hdr => 'Crtd Line',           num => 1, label => 'Line where lock created' },
+   lock_mem_addr               => { hdr => 'Addr',                num => 0, label => 'The lock memory address' },
+   lock_mode                   => { hdr => 'Mode',                num => 0, label => 'The lock mode' },
+   lock_structs                => { hdr => 'LStrcts',             num => 1, label => 'Number of lock structs' },
+   lock_type                   => { hdr => 'Type',                num => 0, label => 'The lock type' },
+   lock_var                    => { hdr => 'Lck Var',             num => 1, label => 'The lock variable' },
+   lock_wait_time              => { hdr => 'Wait',                num => 1, label => 'How long txn has waited for a lock' },
+   log_flushed_to              => { hdr => 'Flushed To',          num => 0, label => 'Log position flushed to' },
+   log_ios_done                => { hdr => 'IO Done',             num => 1, label => 'Log I/Os done' },
+   log_ios_s                   => { hdr => 'IO/Sec',              num => 1, label => 'Average log I/Os per sec' },
+   log_seq_no                  => { hdr => 'Sequence No.',        num => 0, label => 'Log sequence number' },
+   main_thread_id              => { hdr => 'Main Thread ID',      num => 1, label => 'Main thread ID' },
+   main_thread_proc_no         => { hdr => 'Main Thread Proc',    num => 1, label => 'Main thread process number' },
+   main_thread_state           => { hdr => 'Main Thread State',   num => 0, label => 'Main thread state' },
+   master_file                 => { hdr => 'File',                num => 0, label => 'Master file' },
+   master_host                 => { hdr => 'Master',              num => 0, label => 'Master server hostname' },
+   master_log_file             => { hdr => 'Master Log File',     num => 0, label => 'Master log file' },
+   master_port                 => { hdr => 'Master Port',         num => 1, label => 'Master port' },
+   master_pos                  => { hdr => 'Position',            num => 1, label => 'Master position' },
+   master_ssl_allowed          => { hdr => 'Master SSL Allowed',  num => 0, label => 'Master SSL Allowed' },
+   master_ssl_ca_file          => { hdr => 'Master SSL CA File',  num => 0, label => 'Master SSL Cert Auth File' },
+   master_ssl_ca_path          => { hdr => 'Master SSL CA Path',  num => 0, label => 'Master SSL Cert Auth Path' },
+   master_ssl_cert             => { hdr => 'Master SSL Cert',     num => 0, label => 'Master SSL Cert' },
+   master_ssl_cipher           => { hdr => 'Master SSL Cipher',   num => 0, label => 'Master SSL Cipher' },
+   master_ssl_key              => { hdr => 'Master SSL Key',      num => 0, label => 'Master SSL Key' },
+   master_user                 => { hdr => 'Master User',         num => 0, label => 'Master username' },
+   max_txn                     => { hdr => 'MaxTxnTime',          num => 1, label => 'MaxTxn' },
+   merged_recs                 => { hdr => 'Merged Recs',         num => 1, label => 'Merged records' },
+   merges                      => { hdr => 'Merges',              num => 1, label => 'Merges' },
+   mutex_os_waits              => { hdr => 'Waits',               num => 1, label => 'Mutex OS Waits' },
+   mutex_spin_rounds           => { hdr => 'Rounds',              num => 1, label => 'Mutex Spin Rounds' },
+   mutex_spin_waits            => { hdr => 'Spins',               num => 1, label => 'Mutex Spin Waits' },
+   mysql_thread_id             => { hdr => 'ID',                  num => 1, label => 'MySQL connection (thread) ID', },
+   name                        => { hdr => 'Name',                num => 0, label => 'Variable Name' },
+   n_bits                      => { hdr => '# Bits',              num => 1, label => 'Number of bits' },
+   non_hash_searches_s         => { hdr => 'Non-Hash/Sec',        num => 1, label => 'Non-hash searches/sec' },
+   num_deletes                 => { hdr => 'Del',                 num => 1, label => 'Number of deletes' },
+   num_deletes_sec             => { hdr => 'Del/Sec',             num => 1, label => 'Number of deletes' },
+   num_inserts                 => { hdr => 'Ins',                 num => 1, label => 'Number of inserts' },
+   num_inserts_sec             => { hdr => 'Ins/Sec',             num => 1, label => 'Number of inserts' },
+   num_readers                 => { hdr => 'Readers',             num => 1, label => 'Number of readers' },
+   num_reads                   => { hdr => 'Read',                num => 1, label => 'Number of reads' },
+   num_reads_sec               => { hdr => 'Read/Sec',            num => 1, label => 'Number of reads' },
+   num_res_ext                 => { hdr => 'BTree Extents',       num => 1, label => 'Number of extents reserved for B-Tree' },
+   num_rows                    => { hdr => 'Row Count',           num => 1, label => 'Number of rows estimated to examine' },
+   num_times_open              => { hdr => 'In Use',              num => 1, label => '# times table is opened', },
+   num_txns                    => { hdr => 'Txns',                num => 1, label => 'Number of transactions' },
+   num_updates                 => { hdr => 'Upd',                 num => 1, label => 'Number of updates' },
+   num_updates_sec             => { hdr => 'Upd/Sec',             num => 1, label => 'Number of updates' },
+   os_file_reads               => { hdr => 'OS Reads',            num => 1, label => 'OS file reads' },
+   os_file_writes              => { hdr => 'OS Writes',           num => 1, label => 'OS file writes' },
+   os_fsyncs                   => { hdr => 'OS fsyncs',           num => 1, label => 'OS fsyncs' },
+   os_thread_id                => { hdr => 'OS Thread',           num => 1, label => 'The operating system thread ID' },
+   p_aio_writes                => { hdr => 'Async Wrt',           num => 1, label => 'Pending asynchronous I/O writes' },
+   p_buf_pool_flushes          => { hdr => 'Buffer Pool Flushes', num => 1, label => 'Pending buffer pool flushes' },
+   p_ibuf_aio_reads            => { hdr => 'IBuf Async Rds',      num => 1, label => 'Pending insert buffer asynch I/O reads' },
+   p_log_flushes               => { hdr => 'Log Flushes',         num => 1, label => 'Pending log flushes' },
+   p_log_ios                   => { hdr => 'Log I/Os',            num => 1, label => 'Pending log I/O operations' },
+   p_normal_aio_reads          => { hdr => 'Async Rds',           num => 1, label => 'Pending asynchronous I/O reads' },
+   p_preads                    => { hdr => 'preads',              num => 1, label => 'Pending p-reads' },
+   p_pwrites                   => { hdr => 'pwrites',             num => 1, label => 'Pending p-writes' },
+   p_sync_ios                  => { hdr => 'Sync I/Os',           num => 1, label => 'Pending synchronous I/O operations' },
+   page_creates_sec            => { hdr => 'Creates/Sec',         num => 1, label => 'Page creates/sec' },
+   page_no                     => { hdr => 'Page',                num => 1, label => 'Page number' },
+   page_reads_sec              => { hdr => 'Reads/Sec',           num => 1, label => 'Page reads per second' },
+   page_writes_sec             => { hdr => 'Writes/Sec',          num => 1, label => 'Page writes per second' },
+   pages_created               => { hdr => 'Created',             num => 1, label => 'Pages created' },
+   pages_modified              => { hdr => 'Dirty Pages',         num => 1, label => 'Pages modified (dirty)' },
+   pages_read                  => { hdr => 'Reads',               num => 1, label => 'Pages read' },
+   pages_total                 => { hdr => 'Pages',               num => 1, label => 'Pages total' },
+   pages_written               => { hdr => 'Writes',              num => 1, label => 'Pages written' },
+   parent_col                  => { hdr => 'Parent Column',       num => 0, label => 'The referred column in the parent table', },
+   parent_db                   => { hdr => 'Parent DB',           num => 0, label => 'The database of the parent table' },
+   parent_index                => { hdr => 'Parent Index',        num => 0, label => 'The referred index in the parent table' },
+   parent_table                => { hdr => 'Parent Table',        num => 0, label => 'The parent table' },
+   part_id                     => { hdr => 'Part ID',             num => 1, label => 'Sub-part ID of the query' },
+   partitions                  => { hdr => 'Partitions',          num => 0, label => 'Query partitions used' },
+   pct                         => { hdr => 'Pct',                 num => 1, label => 'Percentage' },
+   pending_chkp_writes         => { hdr => 'Chkpt Writes',        num => 1, label => 'Pending log checkpoint writes' },
+   pending_log_writes          => { hdr => 'Log Writes',          num => 1, label => 'Pending log writes' },
+   port                        => { hdr => 'Port',                num => 1, label => 'Client port number', },
+   possible_keys               => { hdr => 'Poss. Keys',          num => 0, label => 'Possible keys' },
+   proc_no                     => { hdr => 'Proc',                num => 1, label => 'Process number' },
+   q_cache_hit                 => { hdr => 'QCacheHit',           num => 1, label => 'Query cache hit ratio', },
+   qps                         => { hdr => 'QPS',                 num => 1, label => 'How many queries/sec', },
+   queries_in_queue            => { hdr => 'Queries Queued',      num => 1, label => 'Queries in queue' },
+   queries_inside              => { hdr => 'Queries Inside',      num => 1, label => 'Queries inside InnoDB' },
+   query_id                    => { hdr => 'Query ID',            num => 1, label => 'Query ID' },
+   query_status                => { hdr => 'Query Status',        num => 0, label => 'The query status' },
+   query_text                  => { hdr => 'Query Text',          num => 0, label => 'The query text' },
+   questions                   => { hdr => 'Questions',           num => 1, label => 'How many queries the server has gotten', },
+   read_master_log_pos         => { hdr => 'Read Master Pos',     num => 1, label => 'Read master log position' },
+   read_views_open             => { hdr => 'Rd Views',            num => 1, label => 'Number of read views open' },
+   reads_pending               => { hdr => 'Pending Reads',       num => 1, label => 'Reads pending' },
+   relay_log_file              => { hdr => 'Relay File',          num => 0, label => 'Relay log file' },
+   relay_log_pos               => { hdr => 'Relay Pos',           num => 1, label => 'Relay log position' },
+   relay_log_size              => { hdr => 'Relay Size',          num => 1, label => 'Relay log size' },
+   relay_master_log_file       => { hdr => 'Relay Master File',   num => 0, label => 'Relay master log file' },
+   replicate_do_db             => { hdr => 'Do DB',               num => 0, label => 'Replicate-do-db setting' },
+   replicate_do_table          => { hdr => 'Do Table',            num => 0, label => 'Replicate-do-table setting' },
+   replicate_ignore_db         => { hdr => 'Ignore DB',           num => 0, label => 'Replicate-ignore-db setting' },
+   replicate_ignore_table      => { hdr => 'Ignore Table',        num => 0, label => 'Replicate-do-table setting' },
+   replicate_wild_do_table     => { hdr => 'Wild Do Table',       num => 0, label => 'Replicate-wild-do-table setting' },
+   replicate_wild_ignore_table => { hdr => 'Wild Ignore Table',   num => 0, label => 'Replicate-wild-ignore-table setting' },
+   request_type                => { hdr => 'Type',                num => 0, label => 'Type of lock the thread waits for' },
+   reservation_count           => { hdr => 'ResCnt',              num => 1, label => 'Reservation Count' },
+   row_locks                   => { hdr => 'RLocks',              num => 1, label => 'Number of row locks' },
+   rw_excl_os_waits            => { hdr => 'RW Waits',            num => 1, label => 'R/W Excl. OS Waits' },
+   rw_excl_spins               => { hdr => 'RW Spins',            num => 1, label => 'R/W Excl. Spins' },
+   rw_shared_os_waits          => { hdr => 'Sh Waits',            num => 1, label => 'R/W Shared OS Waits' },
+   rw_shared_spins             => { hdr => 'Sh Spins',            num => 1, label => 'R/W Shared Spins' },
+   scan_type                   => { hdr => 'Type',                num => 0, label => 'Scan type in chosen' },
+   seg_size                    => { hdr => 'Seg. Size',           num => 1, label => 'Segment size' },
+   select_type                 => { hdr => 'Select Type',         num => 0, label => 'Type of select used' },
+   signal_count                => { hdr => 'Signals',             num => 1, label => 'Signal Count' },
+   size                        => { hdr => 'Size',                num => 1, label => 'Size of the tablespace' },
+   skip_counter                => { hdr => 'Skip Counter',        num => 1, label => 'Skip counter' },
+   slave_catchup_rate          => { hdr => 'Catchup',             num => 1, label => 'How fast the slave is catching up in the binlog' },
+   slave_io_running            => { hdr => 'Slave-IO',            num => 0, label => 'Whether the slave I/O thread is running' },
+   slave_io_state              => { hdr => 'Slave IO State',      num => 0, label => 'Slave I/O thread state' },
+   slave_open_temp_tables      => { hdr => 'Temp',                num => 1, label => 'Slave open temp tables' },
+   slave_sql_running           => { hdr => 'Slave-SQL',           num => 0, label => 'Whether the slave SQL thread is running' },
+   slow                        => { hdr => 'Slow',                num => 1, label => 'How many slow queries', },
+   space_id                    => { hdr => 'Space',               num => 1, label => 'Tablespace ID' },
+   special                     => { hdr => 'Special',             num => 0, label => 'Special/Other info' },
+   state                       => { hdr => 'State',               num => 0, label => 'Connection state', maxw => 18, },
+   tables_in_use               => { hdr => 'Tbl Used',            num => 1, label => 'Number of tables in use' },
+   tables_locked               => { hdr => 'Tbl Lck',             num => 1, label => 'Number of tables locked' },
+   tbl                         => { hdr => 'Table',               num => 0, label => 'Table', },
+   thread                      => { hdr => 'Thread',              num => 1, label => 'Thread number' },
+   thread_decl_inside          => { hdr => 'Thread Inside',       num => 0, label => 'What the thread is declared inside' },
+   thread_purpose              => { hdr => 'Purpose',             num => 0, label => "The thread's purpose" },
+   thread_status               => { hdr => 'Thread Status',       num => 0, label => 'The thread status' },
+   time                        => { hdr => 'Time',                num => 1, label => 'Time since the last event', },
+   time_behind_master          => { hdr => 'TimeLag',             num => 1, label => 'Time slave lags master' },
+   timestring                  => { hdr => 'Timestring',          num => 0, label => 'Time the event occurred' },
+   total                       => { hdr => 'Total',               num => 1, label => 'Total' },
+   total_mem_alloc             => { hdr => 'Memory',              num => 1, label => 'Total memory allocated' },
+   truncates                   => { hdr => 'Trunc',               num => 0, label => 'Whether the deadlock is truncating InnoDB status' },
+   txn_doesnt_see_ge           => { hdr => "Txn Won't See",       num => 0, label => 'Where txn read view is limited' },
+   txn_id                      => { hdr => 'ID',                  num => 0, label => 'Transaction ID' },
+   txn_sees_lt                 => { hdr => 'Txn Sees',            num => 1, label => 'Where txn read view is limited' },
+   txn_status                  => { hdr => 'Txn Status',          num => 0, label => 'Transaction status' },
+   txn_time_remain             => { hdr => 'Remaining',           num => 1, label => 'Time until txn rollback/commit completes' },
+   undo_log_entries            => { hdr => 'Undo',                num => 1, label => 'Number of undo log entries' },
+   undo_for                    => { hdr => 'Undo',                num => 0, label => 'Undo for' },
+   until_condition             => { hdr => 'Until Condition',     num => 0, label => 'Slave until condition' },
+   until_log_file              => { hdr => 'Until Log File',      num => 0, label => 'Slave until log file' },
+   until_log_pos               => { hdr => 'Until Log Pos',       num => 1, label => 'Slave until log position' },
+   used_cells                  => { hdr => 'Cells Used',          num => 1, label => 'Number of cells used' },
+   used_bufs                   => { hdr => 'Used Bufs',           num => 1, label => 'Number of buffer pool pages used' },
+   user                        => { hdr => 'User',                num => 0, label => 'Database username', },
+   value                       => { hdr => 'Value',               num => 1, label => 'Value' },
+   versions                    => { hdr => 'Versions',            num => 1, label => 'Number of InnoDB MVCC versions unpurged' },
+   victim                      => { hdr => 'Victim',              num => 0, label => 'Whether this txn was the deadlock victim' },
+   wait_array_size             => { hdr => 'Wait Array Size',     num => 1, label => 'Wait Array Size' },
+   wait_status                 => { hdr => 'Lock Status',         num => 0, label => 'Status of txn locks' },
+   waited_at_filename          => { hdr => 'File',                num => 0, label => 'Filename at which thread waits' },
+   waited_at_line              => { hdr => 'Line',                num => 1, label => 'Line at which thread waits' },
+   waiters_flag                => { hdr => 'Waiters',             num => 1, label => 'Waiters Flag' },
+   waiting                     => { hdr => 'Waiting',             num => 1, label => 'Whether lock is being waited for' },
+   when                        => { hdr => 'When',                num => 0, label => 'Time scale' },
+   writer_lock_mode            => { hdr => 'Wrtr Lck Mode',       num => 0, label => 'Writer lock mode' },
+   writer_thread               => { hdr => 'Wrtr Thread',         num => 1, label => 'Writer thread ID' },
+   writes_pending              => { hdr => 'Writes',              num => 1, label => 'Number of writes pending' },
+   writes_pending_flush_list   => { hdr => 'Flush List Writes',   num => 1, label => 'Number of flush list writes pending' },
+   writes_pending_lru          => { hdr => 'LRU Writes',          num => 1, label => 'Number of LRU writes pending' },
+   writes_pending_single_page  => { hdr => '1-Page Writes',       num => 1, label => 'Number of 1-page writes pending' },
+);
+
+# Apply a default property or three.  By default, columns are not width-constrained,
+# aligned left, and sorted alphabetically, not numerically.
+foreach my $col ( values %columns ) {
+   map { $col->{$_} ||= 0 } qw(num minw maxw);
+   $col->{just} = $col->{num} ? '' : '-';
+}
+
+# Filters {{{3
+# This hash defines every filter that can be applied to a table.  These
+# become part of tbl_meta as well.  Each filter is just an expression that
+# returns true or false.
+# Properties of each entry:
+#  * func:   the subroutine
+#  * name:   the name, repeated
+#  * user:   whether it's a user-defined filter (saved in config)
+#  * text:   text of the subroutine
+#  * note:   explanation
+my %filters = ();
+
+# These are pre-processed to live in %filters above, by compiling them.
+my %builtin_filters = (
+   hide_self => {
+      text => <<'      END',
+         return ( !$set->{info} || $set->{info} ne 'SHOW FULL PROCESSLIST' )
+             && ( !$set->{query_text}    || $set->{query_text} !~ m/INNODB STATUS$/ );
+      END
+      note => 'Removes the innotop processes from the list',
+      tbls => [qw(innodb_transactions processlist)],
+   },
+   hide_inactive => {
+      text => <<'      END',
+         return ( !defined($set->{txn_status}) || $set->{txn_status} ne 'not started' )
+             && ( !defined($set->{cmd})        || $set->{cmd} !~ m/Sleep|Binlog Dump/ )
+             && ( !defined($set->{info})       || $set->{info} =~ m/\S/               );
+      END
+      note => 'Removes processes which are not doing anything',
+      tbls => [qw(innodb_transactions processlist)],
+   },
+   hide_slave_io => {
+      text => <<'      END',
+         return !$set->{state} || $set->{state} !~ m/^(?:Waiting for master|Has read all relay)/;
+      END
+      note => 'Removes slave I/O threads from the list',
+      tbls => [qw(processlist slave_io_status)],
+   },
+   table_is_open => {
+      text => <<'      END',
+         return $set->{num_times_open} + $set->{is_name_locked};
+      END
+      note => 'Removes tables that are not in use or locked',
+      tbls => [qw(open_tables)],
+   },
+   cxn_is_master => {
+      text => <<'      END',
+         return $set->{master_file} ? 1 : 0;
+      END
+      note => 'Removes servers that are not masters',
+      tbls => [qw(master_status)],
+   },
+   cxn_is_slave => {
+      text => <<'      END',
+         return $set->{master_host} ? 1 : 0;
+      END
+      note => 'Removes servers that are not slaves',
+      tbls => [qw(slave_io_status slave_sql_status)],
+   },
+   thd_is_not_waiting => {
+      text => <<'      END',
+         return $set->{thread_status} !~ m#waiting for i/o request#;
+      END
+      note => 'Removes idle I/O threads',
+      tbls => [qw(io_threads)],
+   },
+);
+foreach my $key ( keys %builtin_filters ) {
+   my ( $sub, $err ) = compile_filter($builtin_filters{$key}->{text});
+   $filters{$key} = {
+      func => $sub,
+      text => $builtin_filters{$key}->{text},
+      user => 0,
+      name => $key, # useful for later
+      note => $builtin_filters{$key}->{note},
+      tbls => $builtin_filters{$key}->{tbls},
+   }
+}
+
+# Variable sets {{{3
+# Sets (arrayrefs) of variables that are used in S mode.  They are read/written to
+# the config file.
+my %var_sets = (
+   general => {
+      text => join(
+         ', ',
+         'set_precision(Questions/Uptime_hires) as QPS',
+         'set_precision(Com_commit/Uptime_hires) as Commit_PS',
+         'set_precision((Com_rollback||0)/(Com_commit||1)) as Rollback_Commit',
+         'set_precision(('
+            . join('+', map { "($_||0)" }
+               qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace
+                  Com_replace_select Com_select Com_update Com_update_multi))
+            . ')/(Com_commit||1)) as Write_Commit',
+         'set_precision((Com_select+(Qcache_hits||0))/(('
+            . join('+', map { "($_||0)" }
+               qw(Com_delete Com_delete_multi Com_insert Com_insert_select Com_replace
+                  Com_replace_select Com_select Com_update Com_update_multi))
+            . ')||1)) as R_W_Ratio',
+         'set_precision(Opened_tables/Uptime_hires) as Opens_PS',
+         'percent($cur->{Open_tables}/($cur->{table_cache})) as Table_Cache_Used',
+         'set_precision(Threads_created/Uptime_hires) as Threads_PS',
+         'percent($cur->{Threads_cached}/($cur->{thread_cache_size}||1)) as Thread_Cache_Used',
+         'percent($cur->{Max_used_connections}/($cur->{max_connections}||1)) as CXN_Used_Ever',
+         'percent($cur->{Threads_connected}/($cur->{max_connections}||1)) as CXN_Used_Now',
+      ),
+   },
+   commands => {
+      text => join(
+         ', ',
+         qw(Uptime Questions Com_delete Com_delete_multi Com_insert
+         Com_insert_select Com_replace Com_replace_select Com_select Com_update
+         Com_update_multi)
+      ),
+   },
+   query_status => {
+      text => join(
+         ',',
+         qw( Uptime Select_full_join Select_full_range_join Select_range
+         Select_range_check Select_scan Slow_queries Sort_merge_passes
+         Sort_range Sort_rows Sort_scan)
+      ),
+   },
+   innodb => {
+      text => join(
+         ',',
+         qw( Uptime Innodb_row_lock_current_waits Innodb_row_lock_time
+         Innodb_row_lock_time_avg Innodb_row_lock_time_max Innodb_row_lock_waits
+         Innodb_rows_deleted Innodb_rows_inserted Innodb_rows_read
+         Innodb_rows_updated)
+      ),
+   },
+   txn => {
+      text => join(
+         ',',
+         qw( Uptime Com_begin Com_commit Com_rollback Com_savepoint
+         Com_xa_commit Com_xa_end Com_xa_prepare Com_xa_recover Com_xa_rollback
+         Com_xa_start)
+      ),
+   },
+   key_cache => {
+      text => join(
+         ',',
+         qw( Uptime Key_blocks_not_flushed Key_blocks_unused Key_blocks_used
+         Key_read_requests Key_reads Key_write_requests Key_writes )
+      ),
+   },
+   query_cache => {
+      text => join(
+         ',',
+         "percent($exprs{QcacheHitRatio}) as Hit_Pct",
+         'set_precision((Qcache_hits||0)/(Qcache_inserts||1)) as Hit_Ins',
+         'set_precision((Qcache_lowmem_prunes||0)/Uptime_hires) as Lowmem_Prunes_sec',
+         'percent(1-((Qcache_free_blocks||0)/(Qcache_total_blocks||1))) as Blocks_used',
+         qw( Qcache_free_blocks Qcache_free_memory Qcache_not_cached Qcache_queries_in_cache)
+      ),
+   },
+   handler => {
+      text => join(
+         ',',
+         qw( Uptime Handler_read_key Handler_read_first Handler_read_next
+         Handler_read_prev Handler_read_rnd Handler_read_rnd_next Handler_delete
+         Handler_update Handler_write)
+      ),
+   },
+   cxns_files_threads => {
+      text => join(
+         ',',
+         qw( Uptime Aborted_clients Aborted_connects Bytes_received Bytes_sent
+         Compression Connections Created_tmp_disk_tables Created_tmp_files
+         Created_tmp_tables Max_used_connections Open_files Open_streams
+         Open_tables Opened_tables Table_locks_immediate Table_locks_waited
+         Threads_cached Threads_connected Threads_created Threads_running)
+      ),
+   },
+   prep_stmt => {
+      text => join(
+         ',',
+         qw( Uptime Com_dealloc_sql Com_execute_sql Com_prepare_sql Com_reset
+         Com_stmt_close Com_stmt_execute Com_stmt_fetch Com_stmt_prepare
+         Com_stmt_reset Com_stmt_send_long_data )
+      ),
+   },
+   innodb_health => {
+      text => join(
+         ',',
+         "$exprs{OldVersions} as OldVersions",
+         qw(IB_sm_mutex_spin_waits IB_sm_mutex_spin_rounds IB_sm_mutex_os_waits),
+         "$exprs{NumTxns} as NumTxns",
+         "$exprs{MaxTxnTime} as MaxTxnTime",
+         qw(IB_ro_queries_inside IB_ro_queries_in_queue),
+         "set_precision($exprs{DirtyBufs} * 100) as dirty_bufs",
+         "set_precision($exprs{BufPoolFill} * 100) as buf_fill",
+         qw(IB_bp_pages_total IB_bp_pages_read IB_bp_pages_written IB_bp_pages_created)
+      ),
+   },
+   innodb_health2 => {
+      text => join(
+         ', ',
+         'percent(1-((Innodb_buffer_pool_pages_free||0)/($cur->{Innodb_buffer_pool_pages_total}||1))) as BP_page_cache_usage',
+         'percent(1-((Innodb_buffer_pool_reads||0)/(Innodb_buffer_pool_read_requests||1))) as BP_cache_hit_ratio',
+         'Innodb_buffer_pool_wait_free',
+         'Innodb_log_waits',
+      ),
+   },
+   slow_queries => {
+      text => join(
+         ', ',
+         'set_precision(Slow_queries/Uptime_hires) as Slow_PS',
+         'set_precision(Select_full_join/Uptime_hires) as Full_Join_PS',
+         'percent(Select_full_join/(Com_select||1)) as Full_Join_Ratio',
+      ),
+   },
+);
+
+# Server sets {{{3
+# Defines sets of servers between which the user can quickly switch.
+my %server_groups;
+
+# Connections {{{3
+# This hash defines server connections.  Each connection is a string that can be passed to
+# the DBI connection.  These are saved in the connections section in the config file.
+my %connections;
+# Defines the parts of connections.
+my @conn_parts = qw(user have_user pass have_pass dsn savepass dl_table);
+
+# Graph widths {{{3
+# This hash defines the max values seen for various status/variable values, for graphing.
+# These are stored in their own section in the config file.  These are just initial values:
+my %mvs = (
+   Com_select   => 50,
+   Com_insert   => 50,
+   Com_update   => 50,
+   Com_delete   => 50,
+   Questions    => 100,
+);
+
+# ###########################################################################
+# Valid Term::ANSIColor color strings.
+# ###########################################################################
+my %ansicolors = map { $_ => 1 }
+   qw( black blink blue bold clear concealed cyan dark green magenta on_black
+       on_blue on_cyan on_green on_magenta on_red on_white on_yellow red reset
+       reverse underline underscore white yellow);
+
+# ###########################################################################
+# Valid comparison operators for color rules
+# ###########################################################################
+my %comp_ops = (
+   '==' => 'Numeric equality',
+   '>'  => 'Numeric greater-than',
+   '<'  => 'Numeric less-than',
+   '>=' => 'Numeric greater-than/equal',
+   '<=' => 'Numeric less-than/equal',
+   '!=' => 'Numeric not-equal',
+   'eq' => 'String equality',
+   'gt' => 'String greater-than',
+   'lt' => 'String less-than',
+   'ge' => 'String greater-than/equal',
+   'le' => 'String less-than/equal',
+   'ne' => 'String not-equal',
+   '=~' => 'Pattern match',
+   '!~' => 'Negated pattern match',
+);
+
+# ###########################################################################
+# Valid aggregate functions.
+# ###########################################################################
+my %agg_funcs = (
+   first => sub {
+      return $_[0]
+   },
+   count => sub {
+      return 0 + @_;
+   },
+   avg   => sub {
+      my @args = grep { defined $_ } @_;
+      return (sum(map { m/([\d\.-]+)/g } @args) || 0) / (scalar(@args) || 1);
+   },
+   sum   => \&sum,
+);
+
+# ###########################################################################
+# Valid functions for transformations.
+# ###########################################################################
+my %trans_funcs = (
+   shorten      => \&shorten,
+   secs_to_time => \&secs_to_time,
+   no_ctrl_char => \&no_ctrl_char,
+   percent      => \&percent,
+   commify      => \&commify,
+   dulint_to_int => \&dulint_to_int,
+   set_precision => \&set_precision,
+);
+
+# Table definitions {{{3
+# This hash defines every table that can get displayed in every mode.  Each
+# table specifies columns and column data sources.  The column is
+# defined by the %columns hash.
+#
+# Example: foo => { src => 'bar' } means the foo column (look at
+# $columns{foo} for its definition) gets its data from the 'bar' element of
+# the current data set, whatever that is.
+#
+# These columns are post-processed after being defined, because they get stuff
+# from %columns.  After all the config is loaded for columns, there's more
+# post-processing too; the subroutines compiled from src get added to
+# the hash elements for extract_values to use.
+# ###########################################################################
+
+my %tbl_meta = (
+   adaptive_hash_index => {
+      capt => 'Adaptive Hash Index',
+      cust => {},
+      cols => {
+         cxn                 => { src => 'cxn' },
+         hash_table_size     => { src => 'IB_ib_hash_table_size', trans => [qw(shorten)], },
+         used_cells          => { src => 'IB_ib_used_cells' },
+         bufs_in_node_heap   => { src => 'IB_ib_bufs_in_node_heap' },
+         hash_searches_s     => { src => 'IB_ib_hash_searches_s' },
+         non_hash_searches_s => { src => 'IB_ib_non_hash_searches_s' },
+      },
+      visible => [ qw(cxn hash_table_size used_cells bufs_in_node_heap hash_searches_s non_hash_searches_s) ],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'ib',
+      group_by => [],
+      aggregate => 0,
+   },
+   buffer_pool => {
+      capt => 'Buffer Pool',
+      cust => {},
+      cols => {
+         cxn                        => { src => 'cxn' },
+         total_mem_alloc            => { src => 'IB_bp_total_mem_alloc', trans => [qw(shorten)], },
+         awe_mem_alloc              => { src => 'IB_bp_awe_mem_alloc', trans => [qw(shorten)], },
+         add_pool_alloc             => { src => 'IB_bp_add_pool_alloc', trans => [qw(shorten)], },
+         buf_pool_size              => { src => 'IB_bp_buf_pool_size', trans => [qw(shorten)], },
+         buf_free                   => { src => 'IB_bp_buf_free' },
+         buf_pool_hit_rate          => { src => 'IB_bp_buf_pool_hit_rate' },
+         buf_pool_reads             => { src => 'IB_bp_buf_pool_reads' },
+         buf_pool_hits              => { src => 'IB_bp_buf_pool_hits' },
+         dict_mem_alloc             => { src => 'IB_bp_dict_mem_alloc' },
+         pages_total                => { src => 'IB_bp_pages_total' },
+         pages_modified             => { src => 'IB_bp_pages_modified' },
+         reads_pending              => { src => 'IB_bp_reads_pending' },
+         writes_pending             => { src => 'IB_bp_writes_pending' },
+         writes_pending_lru         => { src => 'IB_bp_writes_pending_lru' },
+         writes_pending_flush_list  => { src => 'IB_bp_writes_pending_flush_list' },
+         writes_pending_single_page => { src => 'IB_bp_writes_pending_single_page' },
+         page_creates_sec           => { src => 'IB_bp_page_creates_sec' },
+         page_reads_sec             => { src => 'IB_bp_page_reads_sec' },
+         page_writes_sec            => { src => 'IB_bp_page_writes_sec' },
+         pages_created              => { src => 'IB_bp_pages_created' },
+         pages_read                 => { src => 'IB_bp_pages_read' },
+         pages_written              => { src => 'IB_bp_pages_written' },
+      },
+      visible => [ qw(cxn buf_pool_size buf_free pages_total pages_modified buf_pool_hit_rate total_mem_alloc add_pool_alloc)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'bp',
+      group_by => [],
+      aggregate => 0,
+   },
+   # TODO: a new step in set_to_tbl: join result to itself, grouped?
+   # TODO: this would also enable pulling Q and T data together.
+   # TODO: using a SQL-ish language would also allow pivots to be easier -- treat the pivoted data as a view and SELECT from it.
+   cmd_summary => {
+      capt => 'Command Summary',
+      cust => {},
+      cols => {
+         name       => { src => 'name' },
+         total      => { src => 'total' },
+         value      => { src => 'value',                     agg   => 'sum'},
+         pct        => { src => 'value/total',               trans => [qw(percent)] },
+         last_total => { src => 'last_total' },
+         last_value => { src => 'last_value',                agg   => 'sum'},
+         last_pct   => { src => 'last_value/last_total',     trans => [qw(percent)] },
+      },
+      visible   => [qw(name value pct last_value last_pct)],
+      filters   => [qw()],
+      sort_cols => '-value',
+      sort_dir  => '1',
+      innodb    => '',
+      group_by  => [qw(name)],
+      aggregate => 1,
+   },
+   deadlock_locks => {
+      capt => 'Deadlock Locks',
+      cust => {},
+      cols => {
+         cxn              => { src => 'cxn' },
+         mysql_thread_id  => { src => 'mysql_thread_id' },
+         dl_txn_num       => { src => 'dl_txn_num' },
+         lock_type        => { src => 'lock_type' },
+         space_id         => { src => 'space_id' },
+         page_no          => { src => 'page_no' },
+         heap_no          => { src => 'heap_no' },
+         n_bits           => { src => 'n_bits' },
+         index            => { src => 'index' },
+         db               => { src => 'db' },
+         tbl              => { src => 'table' },
+         lock_mode        => { src => 'lock_mode' },
+         special          => { src => 'special' },
+         insert_intention => { src => 'insert_intention' },
+         waiting          => { src => 'waiting' },
+      },
+      visible => [ qw(cxn mysql_thread_id waiting lock_mode db tbl index special insert_intention)],
+      filters => [],
+      sort_cols => 'cxn mysql_thread_id',
+      sort_dir => '1',
+      innodb   => 'dl',
+      group_by => [],
+      aggregate => 0,
+   },
+   deadlock_transactions => {
+      capt => 'Deadlock Transactions',
+      cust => {},
+      cols => {
+         cxn                => { src => 'cxn' },
+         active_secs        => { src => 'active_secs' },
+         dl_txn_num         => { src => 'dl_txn_num' },
+         has_read_view      => { src => 'has_read_view' },
+         heap_size          => { src => 'heap_size' },
+         host_and_domain    => { src => 'hostname' },
+         hostname           => { src => $exprs{Host} },
+         ip                 => { src => 'ip' },
+         lock_structs       => { src => 'lock_structs' },
+         lock_wait_time     => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] },
+         mysql_thread_id    => { src => 'mysql_thread_id' },
+         os_thread_id       => { src => 'os_thread_id' },
+         proc_no            => { src => 'proc_no' },
+         query_id           => { src => 'query_id' },
+         query_status       => { src => 'query_status' },
+         query_text         => { src => 'query_text', trans => [ qw(no_ctrl_char) ] },
+         row_locks          => { src => 'row_locks' },
+         tables_in_use      => { src => 'tables_in_use' },
+         tables_locked      => { src => 'tables_locked' },
+         thread_decl_inside => { src => 'thread_decl_inside' },
+         thread_status      => { src => 'thread_status' },
+         'time'             => { src => 'active_secs', trans => [ qw(secs_to_time) ] },
+         timestring         => { src => 'timestring' },
+         txn_doesnt_see_ge  => { src => 'txn_doesnt_see_ge' },
+         txn_id             => { src => 'txn_id' },
+         txn_sees_lt        => { src => 'txn_sees_lt' },
+         txn_status         => { src => 'txn_status' },
+         truncates          => { src => 'truncates' },
+         undo_log_entries   => { src => 'undo_log_entries' },
+         user               => { src => 'user' },
+         victim             => { src => 'victim' },
+         wait_status        => { src => 'lock_wait_status' },
+      },
+      visible => [ qw(cxn mysql_thread_id timestring user hostname victim time undo_log_entries lock_structs query_text)],
+      filters => [],
+      sort_cols => 'cxn mysql_thread_id',
+      sort_dir => '1',
+      innodb   => 'dl',
+      group_by => [],
+      aggregate => 0,
+   },
+   explain => {
+      capt => 'EXPLAIN Results',
+      cust => {},
+      cols => {
+         part_id       => { src => 'id' },
+         select_type   => { src => 'select_type' },
+         tbl           => { src => 'table' },
+         partitions    => { src => 'partitions' },
+         scan_type     => { src => 'type' },
+         possible_keys => { src => 'possible_keys' },
+         index         => { src => 'key' },
+         key_len       => { src => 'key_len' },
+         index_ref     => { src => 'ref' },
+         num_rows      => { src => 'rows' },
+         special       => { src => 'extra' },
+      },
+      visible => [ qw(select_type tbl partitions scan_type possible_keys index key_len index_ref num_rows special)],
+      filters => [],
+      sort_cols => '',
+      sort_dir => '1',
+      innodb   => '',
+      group_by => [],
+      aggregate => 0,
+   },
+   file_io_misc => {
+      capt => 'File I/O Misc',
+      cust => {},
+      cols => {
+         cxn            => { src => 'cxn' },
+         io_bytes_s     => { src => 'IB_io_avg_bytes_s' },
+         io_flush_type  => { src => 'IB_io_flush_type' },
+         io_fsyncs_s    => { src => 'IB_io_fsyncs_s' },
+         io_reads_s     => { src => 'IB_io_reads_s' },
+         io_writes_s    => { src => 'IB_io_writes_s' },
+         os_file_reads  => { src => 'IB_io_os_file_reads' },
+         os_file_writes => { src => 'IB_io_os_file_writes' },
+         os_fsyncs      => { src => 'IB_io_os_fsyncs' },
+      },
+      visible => [ qw(cxn os_file_reads os_file_writes os_fsyncs io_reads_s io_writes_s io_bytes_s)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'io',
+      group_by => [],
+      aggregate => 0,
+   },
+   fk_error => {
+      capt => 'Foreign Key Error Info',
+      cust => {},
+      cols => {
+         timestring   => { src => 'IB_fk_timestring' },
+         child_db     => { src => 'IB_fk_child_db' },
+         child_table  => { src => 'IB_fk_child_table' },
+         child_index  => { src => 'IB_fk_child_index' },
+         fk_name      => { src => 'IB_fk_fk_name' },
+         parent_db    => { src => 'IB_fk_parent_db' },
+         parent_table => { src => 'IB_fk_parent_table' },
+         parent_col   => { src => 'IB_fk_parent_col' },
+         parent_index => { src => 'IB_fk_parent_index' },
+         attempted_op => { src => 'IB_fk_attempted_op' },
+      },
+      visible => [ qw(timestring child_db child_table child_index parent_db parent_table parent_col parent_index fk_name attempted_op)],
+      filters => [],
+      sort_cols => '',
+      sort_dir => '1',
+      innodb   => 'fk',
+      group_by => [],
+      aggregate => 0,
+   },
+   insert_buffers => {
+      capt => 'Insert Buffers',
+      cust => {},
+      cols => {
+         cxn           => { src => 'cxn' },
+         inserts       => { src => 'IB_ib_inserts' },
+         merged_recs   => { src => 'IB_ib_merged_recs' },
+         merges        => { src => 'IB_ib_merges' },
+         size          => { src => 'IB_ib_size' },
+         free_list_len => { src => 'IB_ib_free_list_len' },
+         seg_size      => { src => 'IB_ib_seg_size' },
+      },
+      visible => [ qw(cxn inserts merged_recs merges size free_list_len seg_size)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'ib',
+      group_by => [],
+      aggregate => 0,
+   },
+   innodb_locks  => {
+      capt => 'InnoDB Locks',
+      cust => {},
+      cols => {
+         cxn              => { src => 'cxn' },
+         db               => { src => 'db' },
+         index            => { src => 'index' },
+         insert_intention => { src => 'insert_intention' },
+         lock_mode        => { src => 'lock_mode' },
+         lock_type        => { src => 'lock_type' },
+         lock_wait_time   => { src => 'lock_wait_time', trans => [ qw(secs_to_time) ] },
+         mysql_thread_id  => { src => 'mysql_thread_id' },
+         n_bits           => { src => 'n_bits' },
+         page_no          => { src => 'page_no' },
+         space_id         => { src => 'space_id' },
+         special          => { src => 'special' },
+         tbl              => { src => 'table' },
+         'time'           => { src => 'active_secs', hdr => 'Active', trans => [ qw(secs_to_time) ] },
+         txn_id           => { src => 'txn_id' },
+         waiting          => { src => 'waiting' },
+      },
+      visible => [ qw(cxn mysql_thread_id lock_type waiting lock_wait_time time lock_mode db tbl index insert_intention special)],
+      filters => [],
+      sort_cols => 'cxn -lock_wait_time',
+      sort_dir => '1',
+      innodb   => 'tx',
+      colors   => [
+         { col => 'lock_wait_time', op => '>',  arg => 60, color => 'red' },
+         { col => 'lock_wait_time', op => '>',  arg => 30, color => 'yellow' },
+         { col => 'lock_wait_time', op => '>',  arg => 10, color => 'green' },
+      ],
+      group_by => [],
+      aggregate => 0,
+   },
+   innodb_transactions => {
+      capt => 'InnoDB Transactions',
+      cust => {},
+      cols => {
+         cxn                => { src => 'cxn' },
+         active_secs        => { src => 'active_secs' },
+         has_read_view      => { src => 'has_read_view' },
+         heap_size          => { src => 'heap_size' },
+         hostname           => { src => $exprs{Host} },
+         ip                 => { src => 'ip' },
+         wait_status        => { src => 'lock_wait_status' },
+         lock_wait_time     => { src => 'lock_wait_time',      trans => [ qw(secs_to_time) ] },
+         lock_structs       => { src => 'lock_structs' },
+         mysql_thread_id    => { src => 'mysql_thread_id' },
+         os_thread_id       => { src => 'os_thread_id' },
+         proc_no            => { src => 'proc_no' },
+         query_id           => { src => 'query_id' },
+         query_status       => { src => 'query_status' },
+         query_text         => { src => 'query_text',          trans => [ qw(no_ctrl_char) ] },
+         txn_time_remain    => { src => $exprs{TxnTimeRemain}, trans => [ qw(secs_to_time) ] },
+         row_locks          => { src => 'row_locks' },
+         tables_in_use      => { src => 'tables_in_use' },
+         tables_locked      => { src => 'tables_locked' },
+         thread_decl_inside => { src => 'thread_decl_inside' },
+         thread_status      => { src => 'thread_status' },
+         'time'             => { src => 'active_secs',         trans => [ qw(secs_to_time) ], agg => 'sum' },
+         txn_doesnt_see_ge  => { src => 'txn_doesnt_see_ge' },
+         txn_id             => { src => 'txn_id' },
+         txn_sees_lt        => { src => 'txn_sees_lt' },
+         txn_status         => { src => 'txn_status',          minw => 10, maxw => 10 },
+         undo_log_entries   => { src => 'undo_log_entries' },
+         user               => { src => 'user',                maxw => 10 },
+         cnt                => { src => 'mysql_thread_id',     minw => 0 },
+      },
+      visible => [ qw(cxn cnt mysql_thread_id user hostname txn_status time undo_log_entries query_text)],
+      filters => [ qw( hide_self hide_inactive ) ],
+      sort_cols => '-active_secs txn_status cxn mysql_thread_id',
+      sort_dir => '1',
+      innodb   => 'tx',
+      hide_caption => 1,
+      colors   => [
+         { col => 'wait_status', op => 'eq', arg => 'LOCK WAIT',   color => 'black on_red' },
+         { col => 'time',        op => '>',  arg => 600,           color => 'red' },
+         { col => 'time',        op => '>',  arg => 300,           color => 'yellow' },
+         { col => 'time',        op => '>',  arg => 60,            color => 'green' },
+         { col => 'time',        op => '>',  arg => 30,            color => 'cyan' },
+         { col => 'txn_status',  op => 'eq', arg => 'not started', color => 'white' },
+      ],
+      group_by => [ qw(cxn txn_status) ],
+      aggregate => 0,
+   },
+   io_threads => {
+      capt => 'I/O Threads',
+      cust => {},
+      cols => {
+         cxn            => { src => 'cxn' },
+         thread         => { src => 'thread' },
+         thread_purpose => { src => 'purpose' },
+         event_set      => { src => 'event_set' },
+         thread_status  => { src => 'state' },
+      },
+      visible => [ qw(cxn thread thread_purpose thread_status)],
+      filters => [ qw() ],
+      sort_cols => 'cxn thread',
+      sort_dir => '1',
+      innodb   => 'io',
+      group_by => [],
+      aggregate => 0,
+   },
+   log_statistics => {
+      capt => 'Log Statistics',
+      cust => {},
+      cols => {
+         cxn                 => { src => 'cxn' },
+         last_chkp           => { src => 'IB_lg_last_chkp' },
+         log_flushed_to      => { src => 'IB_lg_log_flushed_to' },
+         log_ios_done        => { src => 'IB_lg_log_ios_done' },
+         log_ios_s           => { src => 'IB_lg_log_ios_s' },
+         log_seq_no          => { src => 'IB_lg_log_seq_no' },
+         pending_chkp_writes => { src => 'IB_lg_pending_chkp_writes' },
+         pending_log_writes  => { src => 'IB_lg_pending_log_writes' },
+      },
+      visible => [ qw(cxn log_seq_no log_flushed_to last_chkp log_ios_done log_ios_s)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'lg',
+      group_by => [],
+      aggregate => 0,
+   },
+   master_status => {
+      capt => 'Master Status',
+      cust => {},
+      cols => {
+         cxn                         => { src => 'cxn' },
+         binlog_do_db                => { src => 'binlog_do_db' },
+         binlog_ignore_db            => { src => 'binlog_ignore_db' },
+         master_file                 => { src => 'file' },
+         master_pos                  => { src => 'position' },
+         binlog_cache_overflow       => { src => '(Binlog_cache_disk_use||0)/(Binlog_cache_use||1)', trans => [ qw(percent) ] },
+      },
+      visible => [ qw(cxn master_file master_pos binlog_cache_overflow)],
+      filters => [ qw(cxn_is_master) ],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => '',
+      group_by => [],
+      aggregate => 0,
+   },
+   pending_io => {
+      capt => 'Pending I/O',
+      cust => {},
+      cols => {
+         cxn                => { src => 'cxn' },
+         p_normal_aio_reads => { src => 'IB_io_pending_normal_aio_reads' },
+         p_aio_writes       => { src => 'IB_io_pending_aio_writes' },
+         p_ibuf_aio_reads   => { src => 'IB_io_pending_ibuf_aio_reads' },
+         p_sync_ios         => { src => 'IB_io_pending_sync_ios' },
+         p_buf_pool_flushes => { src => 'IB_io_pending_buffer_pool_flushes' },
+         p_log_flushes      => { src => 'IB_io_pending_log_flushes' },
+         p_log_ios          => { src => 'IB_io_pending_log_ios' },
+         p_preads           => { src => 'IB_io_pending_preads' },
+         p_pwrites          => { src => 'IB_io_pending_pwrites' },
+      },
+      visible => [ qw(cxn p_normal_aio_reads p_aio_writes p_ibuf_aio_reads p_sync_ios p_log_flushes p_log_ios)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'io',
+      group_by => [],
+      aggregate => 0,
+   },
+   open_tables => {
+      capt => 'Open Tables',
+      cust => {},
+      cols => {
+         cxn            => { src => 'cxn' },
+         db             => { src => 'database' },
+         tbl            => { src => 'table' },
+         num_times_open => { src => 'in_use' },
+         is_name_locked => { src => 'name_locked' },
+      },
+      visible => [ qw(cxn db tbl num_times_open is_name_locked)],
+      filters => [ qw(table_is_open) ],
+      sort_cols => '-num_times_open cxn db tbl',
+      sort_dir => '1',
+      innodb   => '',
+      group_by => [],
+      aggregate => 0,
+   },
+   page_statistics => {
+      capt => 'Page Statistics',
+      cust => {},
+      cols => {
+         cxn              => { src => 'cxn' },
+         pages_read       => { src => 'IB_bp_pages_read' },
+         pages_written    => { src => 'IB_bp_pages_written' },
+         pages_created    => { src => 'IB_bp_pages_created' },
+         page_reads_sec   => { src => 'IB_bp_page_reads_sec' },
+         page_writes_sec  => { src => 'IB_bp_page_writes_sec' },
+         page_creates_sec => { src => 'IB_bp_page_creates_sec' },
+      },
+      visible => [ qw(cxn pages_read pages_written pages_created page_reads_sec page_writes_sec page_creates_sec)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'bp',
+      group_by => [],
+      aggregate => 0,
+   },
+   processlist => {
+      capt => 'MySQL Process List',
+      cust => {},
+      cols => {
+         cxn             => { src => 'cxn',        minw => 6,  maxw => 10 },
+         mysql_thread_id => { src => 'id',         minw => 6,  maxw => 0 },
+         user            => { src => 'user',       minw => 5,  maxw => 8 },
+         hostname        => { src => $exprs{Host}, minw => 13, maxw => 8, },
+         port            => { src => $exprs{Port}, minw => 0,  maxw => 0, },
+         host_and_port   => { src => 'host',       minw => 0,  maxw => 0 },
+         db              => { src => 'db',         minw => 6,  maxw => 12 },
+         cmd             => { src => 'command',    minw => 5,  maxw => 0 },
+         time            => { src => 'time',       minw => 5,  maxw => 0, trans => [ qw(secs_to_time) ], agg => 'sum' },
+         state           => { src => 'state',      minw => 0,  maxw => 0 },
+         info            => { src => 'info',       minw => 0,  maxw => 0, trans => [ qw(no_ctrl_char) ] },
+         cnt             => { src => 'id',         minw => 0,  maxw => 0 },
+      },
+      visible => [ qw(cxn cmd cnt mysql_thread_id user hostname db time info)],
+      filters => [ qw(hide_self hide_inactive hide_slave_io) ],
+      sort_cols => '-time cxn hostname mysql_thread_id',
+      sort_dir => '1',
+      innodb   => '',
+      hide_caption => 1,
+      colors   => [
+         { col => 'state',       op => 'eq', arg => 'Locked',      color => 'black on_red' },
+         { col => 'cmd',         op => 'eq', arg => 'Sleep',       color => 'white' },
+         { col => 'user',        op => 'eq', arg => 'system user', color => 'white' },
+         { col => 'cmd',         op => 'eq', arg => 'Connect',     color => 'white' },
+         { col => 'cmd',         op => 'eq', arg => 'Binlog Dump', color => 'white' },
+         { col => 'time',        op => '>',  arg => 600,           color => 'red' },
+         { col => 'time',        op => '>',  arg => 120,           color => 'yellow' },
+         { col => 'time',        op => '>',  arg => 60,            color => 'green' },
+         { col => 'time',        op => '>',  arg => 30,            color => 'cyan' },
+      ],
+      group_by => [qw(cxn cmd)],
+      aggregate => 0,
+   },
+
+   # TODO: some more columns:
+   # kb_used=hdr='BufUsed' minw='0' num='0' src='percent(1 - ((Key_blocks_unused * key_cache_block_size) / (key_buffer_size||1)))' dec='0' trans='' tbl='q_header' just='-' user='1' maxw='0' label='User-defined'
+   # retries=hdr='Retries' minw='0' num='0' src='Slave_retried_transactions' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined'
+   # thd=hdr='Thd' minw='0' num='0' src='Threads_connected' dec='0' trans='' tbl='slave_sql_status' just='-' user='1' maxw='0' label='User-defined'
+
+   q_header => {
+      capt => 'Q-mode Header',
+      cust => {},
+      cols => {
+         cxn            => { src => 'cxn' },
+         questions      => { src => 'Questions' },
+         qps            => { src => 'Questions/Uptime_hires',               dec => 1, trans => [qw(shorten)] },
+         load           => { src => $exprs{ServerLoad},                     dec => 1, trans => [qw(shorten)] },
+         slow           => { src => 'Slow_queries',                         dec => 1, trans => [qw(shorten)] },
+         q_cache_hit    => { src => $exprs{QcacheHitRatio},                 dec => 1, trans => [qw(percent)] },
+         key_buffer_hit => { src => '1-(Key_reads/(Key_read_requests||1))', dec => 1, trans => [qw(percent)] },
+         bps_in         => { src => 'Bytes_received/Uptime_hires',          dec => 1, trans => [qw(shorten)] },
+         bps_out        => { src => 'Bytes_sent/Uptime_hires',              dec => 1, trans => [qw(shorten)] },
+         when           => { src => 'when' },
+      },
+      visible => [ qw(cxn when load qps slow q_cache_hit key_buffer_hit bps_in bps_out)],
+      filters => [],
+      sort_cols => 'when cxn',
+      sort_dir => '1',
+      innodb   => '',
+      hide_caption => 1,
+      group_by => [],
+      aggregate => 0,
+   },
+   row_operations => {
+      capt => 'InnoDB Row Operations',
+      cust => {},
+      cols => {
+         cxn         => { src => 'cxn' },
+         num_inserts => { src => 'IB_ro_num_rows_ins' },
+         num_updates => { src => 'IB_ro_num_rows_upd' },
+         num_reads   => { src => 'IB_ro_num_rows_read' },
+         num_deletes => { src => 'IB_ro_num_rows_del' },
+         num_inserts_sec => { src => 'IB_ro_ins_sec' },
+         num_updates_sec => { src => 'IB_ro_upd_sec' },
+         num_reads_sec   => { src => 'IB_ro_read_sec' },
+         num_deletes_sec => { src => 'IB_ro_del_sec' },
+      },
+      visible => [ qw(cxn num_inserts num_updates num_reads num_deletes num_inserts_sec
+                       num_updates_sec num_reads_sec num_deletes_sec)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'ro',
+      group_by => [],
+      aggregate => 0,
+   },
+   row_operation_misc => {
+      capt => 'Row Operation Misc',
+      cust => {},
+      cols => {
+         cxn                 => { src => 'cxn' },
+         queries_in_queue    => { src => 'IB_ro_queries_in_queue' },
+         queries_inside      => { src => 'IB_ro_queries_inside' },
+         read_views_open     => { src => 'IB_ro_read_views_open' },
+         main_thread_id      => { src => 'IB_ro_main_thread_id' },
+         main_thread_proc_no => { src => 'IB_ro_main_thread_proc_no' },
+         main_thread_state   => { src => 'IB_ro_main_thread_state' },
+         num_res_ext         => { src => 'IB_ro_n_reserved_extents' },
+      },
+      visible => [ qw(cxn queries_in_queue queries_inside read_views_open main_thread_state)],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'ro',
+      group_by => [],
+      aggregate => 0,
+   },
+   semaphores => {
+      capt => 'InnoDB Semaphores',
+      cust => {},
+      cols => {
+         cxn                => { src => 'cxn' },
+         mutex_os_waits     => { src => 'IB_sm_mutex_os_waits' },
+         mutex_spin_rounds  => { src => 'IB_sm_mutex_spin_rounds' },
+         mutex_spin_waits   => { src => 'IB_sm_mutex_spin_waits' },
+         reservation_count  => { src => 'IB_sm_reservation_count' },
+         rw_excl_os_waits   => { src => 'IB_sm_rw_excl_os_waits' },
+         rw_excl_spins      => { src => 'IB_sm_rw_excl_spins' },
+         rw_shared_os_waits => { src => 'IB_sm_rw_shared_os_waits' },
+         rw_shared_spins    => { src => 'IB_sm_rw_shared_spins' },
+         signal_count       => { src => 'IB_sm_signal_count' },
+         wait_array_size    => { src => 'IB_sm_wait_array_size' },
+      },
+      visible => [ qw(cxn mutex_os_waits mutex_spin_waits mutex_spin_rounds
+         rw_excl_os_waits rw_excl_spins rw_shared_os_waits rw_shared_spins
+         signal_count reservation_count )],
+      filters => [],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => 'sm',
+      group_by => [],
+      aggregate => 0,
+   },
+   slave_io_status => {
+      capt => 'Slave I/O Status',
+      cust => {},
+      cols => {
+         cxn                         => { src => 'cxn' },
+         connect_retry               => { src => 'connect_retry' },
+         master_host                 => { src => 'master_host', hdr => 'Master'},
+         master_log_file             => { src => 'master_log_file', hdr => 'File' },
+         master_port                 => { src => 'master_port' },
+         master_ssl_allowed          => { src => 'master_ssl_allowed' },
+         master_ssl_ca_file          => { src => 'master_ssl_ca_file' },
+         master_ssl_ca_path          => { src => 'master_ssl_ca_path' },
+         master_ssl_cert             => { src => 'master_ssl_cert' },
+         master_ssl_cipher           => { src => 'master_ssl_cipher' },
+         master_ssl_key              => { src => 'master_ssl_key' },
+         master_user                 => { src => 'master_user' },
+         read_master_log_pos         => { src => 'read_master_log_pos', hdr => 'Pos' },
+         relay_log_size              => { src => 'relay_log_space', trans => [qw(shorten)] },
+         slave_io_running            => { src => 'slave_io_running', hdr => 'On?' },
+         slave_io_state              => { src => 'slave_io_state', hdr => 'State' },
+      },
+      visible => [ qw(cxn master_host slave_io_running master_log_file relay_log_size read_master_log_pos slave_io_state)],
+      filters => [ qw( cxn_is_slave ) ],
+      sort_cols => 'slave_io_running cxn',
+      colors   => [
+         { col => 'slave_io_running',  op => 'ne', arg => 'Yes', color => 'black on_red' },
+      ],
+      sort_dir => '1',
+      innodb   => '',
+      group_by => [],
+      aggregate => 0,
+   },
+   slave_sql_status => {
+      capt => 'Slave SQL Status',
+      cust => {},
+      cols => {
+         cxn                         => { src => 'cxn' },
+         exec_master_log_pos         => { src => 'exec_master_log_pos', hdr => 'Master Pos' },
+         last_errno                  => { src => 'last_errno' },
+         last_error                  => { src => 'last_error' },
+         master_host                 => { src => 'master_host', hdr => 'Master' },
+         relay_log_file              => { src => 'relay_log_file' },
+         relay_log_pos               => { src => 'relay_log_pos' },
+         relay_log_size              => { src => 'relay_log_space', trans => [qw(shorten)] },
+         relay_master_log_file       => { src => 'relay_master_log_file', hdr => 'Master File' },
+         replicate_do_db             => { src => 'replicate_do_db' },
+         replicate_do_table          => { src => 'replicate_do_table' },
+         replicate_ignore_db         => { src => 'replicate_ignore_db' },
+         replicate_ignore_table      => { src => 'replicate_ignore_table' },
+         replicate_wild_do_table     => { src => 'replicate_wild_do_table' },
+         replicate_wild_ignore_table => { src => 'replicate_wild_ignore_table' },
+         skip_counter                => { src => 'skip_counter' },
+         slave_sql_running           => { src => 'slave_sql_running', hdr => 'On?' },
+         until_condition             => { src => 'until_condition' },
+         until_log_file              => { src => 'until_log_file' },
+         until_log_pos               => { src => 'until_log_pos' },
+         time_behind_master          => { src => 'seconds_behind_master', trans => [ qw(secs_to_time) ] },
+         bytes_behind_master         => { src => 'master_log_file && master_log_file eq relay_master_log_file ? read_master_log_pos - exec_master_log_pos : 0', trans => [qw(shorten)] },
+         slave_catchup_rate          => { src => $exprs{SlaveCatchupRate}, trans => [ qw(set_precision) ] },
+         slave_open_temp_tables      => { src => 'Slave_open_temp_tables' },
+      },
+      visible => [ qw(cxn master_host slave_sql_running time_behind_master slave_catchup_rate slave_open_temp_tables relay_log_pos last_error)],
+      filters => [ qw( cxn_is_slave ) ],
+      sort_cols => 'slave_sql_running cxn',
+      sort_dir => '1',
+      innodb   => '',
+      colors   => [
+         { col => 'slave_sql_running',  op => 'ne', arg => 'Yes', color => 'black on_red' },
+         { col => 'time_behind_master', op => '>',  arg => 600,   color => 'red' },
+         { col => 'time_behind_master', op => '>',  arg => 60,    color => 'yellow' },
+         { col => 'time_behind_master', op => '==', arg => 0,     color => 'white' },
+      ],
+      group_by => [],
+      aggregate => 0,
+   },
+   t_header => {
+      capt => 'T-Mode Header',
+      cust => {},
+      cols => {
+         cxn                         => { src => 'cxn' },
+         dirty_bufs                  => { src => $exprs{DirtyBufs},           trans => [qw(percent)] },
+         history_list_len            => { src => 'IB_tx_history_list_len' },
+         lock_structs                => { src => 'IB_tx_num_lock_structs' },
+         num_txns                    => { src => $exprs{NumTxns} },
+         max_txn                     => { src => $exprs{MaxTxnTime},          trans => [qw(secs_to_time)] },
+         undo_for                    => { src => 'IB_tx_purge_undo_for' },
+         used_bufs                   => { src => $exprs{BufPoolFill},         trans => [qw(percent)]},
+         versions                    => { src => $exprs{OldVersions} },
+      },
+      visible => [ qw(cxn history_list_len versions undo_for dirty_bufs used_bufs num_txns max_txn lock_structs)],
+      filters => [ ],
+      sort_cols => 'cxn',
+      sort_dir => '1',
+      innodb   => '',
+      colors   => [],
+      hide_caption => 1,
+      group_by => [],
+      aggregate => 0,
+   },
+   var_status => {
+      capt      => 'Variables & Status',
+      cust      => {},
+      cols      => {}, # Generated from current varset
+      visible   => [], # Generated from current varset
+      filters   => [],
+      sort_cols => '',
+      sort_dir  => 1,
+      innodb    => '',
+      temp      => 1, # Do not persist to config file.
+      hide_caption  => 1,
+      pivot     => 0,
+      group_by => [],
+      aggregate => 0,
+   },
+   wait_array => {
+      capt => 'InnoDB Wait Array',
+      cust => {},
+      cols => {
+         cxn                => { src => 'cxn' },
+         thread             => { src => 'thread' },
+         waited_at_filename => { src => 'waited_at_filename' },
+         waited_at_line     => { src => 'waited_at_line' },
+         'time'             => { src => 'waited_secs', trans => [ qw(secs_to_time) ] },
+         request_type       => { src => 'request_type' },
+         lock_mem_addr      => { src => 'lock_mem_addr' },
+         lock_cfile_name    => { src => 'lock_cfile_name' },
+         lock_cline         => { src => 'lock_cline' },
+         writer_thread      => { src => 'writer_thread' },
+         writer_lock_mode   => { src => 'writer_lock_mode' },
+         num_readers        => { src => 'num_readers' },
+         lock_var           => { src => 'lock_var' },
+         waiters_flag       => { src => 'waiters_flag' },
+         last_s_file_name   => { src => 'last_s_file_name' },
+         last_s_line        => { src => 'last_s_line' },
+         last_x_file_name   => { src => 'last_x_file_name' },
+         last_x_line        => { src => 'last_x_line' },
+         cell_waiting       => { src => 'cell_waiting' },
+         cell_event_set     => { src => 'cell_event_set' },
+      },
+      visible => [ qw(cxn thread time waited_at_filename waited_at_line request_type num_readers lock_var waiters_flag cell_waiting cell_event_set)],
+      filters => [],
+      sort_cols => 'cxn -time',
+      sort_dir => '1',
+      innodb   => 'sm',
+      group_by => [],
+      aggregate => 0,
+   },
+);
+
+# Initialize %tbl_meta from %columns and do some checks.
+foreach my $table_name ( keys %tbl_meta ) {
+   my $table = $tbl_meta{$table_name};
+   my $cols  = $table->{cols};
+
+   foreach my $col_name ( keys %$cols ) {
+      my $col_def = $table->{cols}->{$col_name};
+      die "I can't find a column named '$col_name' for '$table_name'" unless $columns{$col_name};
+      $columns{$col_name}->{referenced} = 1;
+
+      foreach my $prop ( keys %col_props ) {
+         # Each column gets non-existing values set from %columns or defaults from %col_props.
+         if ( !$col_def->{$prop} ) {
+            $col_def->{$prop}
+               = defined($columns{$col_name}->{$prop})
+               ? $columns{$col_name}->{$prop}
+               : $col_props{$prop};
+         }
+      }
+
+      # Ensure transformations and aggregate functions are valid
+      die "Unknown aggregate function '$col_def->{agg}' "
+         . "for column '$col_name' in table '$table_name'"
+         unless exists $agg_funcs{$col_def->{agg}};
+      foreach my $trans ( @{$col_def->{trans}} ) {
+         die "Unknown transformation '$trans' "
+            . "for column '$col_name' in table '$table_name'"
+            unless exists $trans_funcs{$trans};
+      }
+   }
+
+   # Ensure each column in visible and group_by exists in cols
+   foreach my $place ( qw(visible group_by) ) {
+      foreach my $col_name ( @{$table->{$place}} ) {
+         if ( !exists $cols->{$col_name} ) {
+            die "Column '$col_name' is listed in '$place' for '$table_name', but doesn't exist";
+         }
+      }
+   }
+
+   # Compile sort and color subroutines
+   $table->{sort_func}  = make_sort_func($table);
+   $table->{color_func} = make_color_func($table);
+}
+
+# This is for code cleanup:
+{
+   my @unused_cols = grep { !$columns{$_}->{referenced} } sort keys %columns;
+   if ( @unused_cols ) {
+      die "The following columns are not used: "
+         . join(' ', @unused_cols);
+   }
+}
+
+# ###########################################################################
+# Operating modes {{{3
+# ###########################################################################
+my %modes = (
+   B => {
+      hdr               => 'InnoDB Buffers',
+      cust              => {},
+      note              => 'Shows buffer info from InnoDB',
+      action_for        => {
+         i => {
+            action => sub { toggle_config('status_inc') },
+            label  => 'Toggle incremental status display',
+         },
+      },
+      display_sub       => \&display_B,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)],
+      visible_tables    => [qw(buffer_pool page_statistics insert_buffers adaptive_hash_index)],
+   },
+   C => {
+      hdr               => 'Command Summary',
+      cust              => {},
+      note              => 'Shows relative magnitude of variables',
+      action_for        => {
+         s => {
+            action => sub { get_config_interactive('cmd_filter') },
+            label  => 'Choose variable prefix',
+         },
+      },
+      display_sub       => \&display_C,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(cmd_summary)],
+      visible_tables    => [qw(cmd_summary)],
+   },
+   D => {
+      hdr               => 'InnoDB Deadlocks',
+      cust              => {},
+      note              => 'View InnoDB deadlock information',
+      action_for        => {
+         c => {
+            action => sub { edit_table('deadlock_transactions') },
+            label  => 'Choose visible columns',
+         },
+         w => {
+            action => \&create_deadlock,
+            label  => 'Wipe deadlock status info by creating a deadlock',
+         },
+      },
+      display_sub       => \&display_D,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(deadlock_transactions deadlock_locks)],
+      visible_tables    => [qw(deadlock_transactions deadlock_locks)],
+   },
+   F => {
+      hdr               => 'InnoDB FK Err',
+      cust              => {},
+      note              => 'View the latest InnoDB foreign key error',
+      action_for        => {},
+      display_sub       => \&display_F,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 1,
+      tables            => [qw(fk_error)],
+      visible_tables    => [qw(fk_error)],
+   },
+   I => {
+      hdr               => 'InnoDB I/O Info',
+      cust              => {},
+      note              => 'Shows I/O info (i/o, log...) from InnoDB',
+      action_for        => {
+         i => {
+            action => sub { toggle_config('status_inc') },
+            label  => 'Toggle incremental status display',
+         },
+      },
+      display_sub       => \&display_I,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(io_threads pending_io file_io_misc log_statistics)],
+      visible_tables    => [qw(io_threads pending_io file_io_misc log_statistics)],
+   },
+   L => {
+      hdr             => 'Locks',
+      cust            => {},
+      note            => 'Shows transaction locks',
+      action_for      => {
+         a => {
+            action => sub { send_cmd_to_servers('CREATE TABLE IF NOT EXISTS test.innodb_lock_monitor(a int) ENGINE=InnoDB', 0, '', []); },
+            label  => 'Start the InnoDB Lock Monitor',
+         },
+         o => {
+            action => sub { send_cmd_to_servers('DROP TABLE IF EXISTS test.innodb_lock_monitor', 0, '', []); },
+            label  => 'Stop the InnoDB Lock Monitor',
+         },
+      },
+      display_sub     => \&display_L,
+      connections     => [],
+      server_group    => '',
+      one_connection  => 0,
+      tables            => [qw(innodb_locks)],
+      visible_tables    => [qw(innodb_locks)],
+   },
+   M => {
+      hdr               => 'Replication Status',
+      cust              => {},
+      note              => 'Shows replication (master and slave) status',
+      action_for        => {
+         a => {
+            action => sub { send_cmd_to_servers('START SLAVE', 0, 'START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE = ?, MASTER_LOG_POS = ?', []); },
+            label  => 'Start slave(s)',
+         },
+         i => {
+            action => sub { toggle_config('status_inc') },
+            label  => 'Toggle incremental status display',
+         },
+         o => {
+            action => sub { send_cmd_to_servers('STOP SLAVE', 0, '', []); },
+            label  => 'Stop slave(s)',
+         },
+         b => {
+            action => sub { purge_master_logs() },
+            label  => 'Purge unused master logs',
+         },
+      },
+      display_sub       => \&display_M,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(slave_sql_status slave_io_status master_status)],
+      visible_tables    => [qw(slave_sql_status slave_io_status master_status)],
+   },
+   O => {
+      hdr               => 'Open Tables',
+      cust              => {},
+      note              => 'Shows open tables in MySQL',
+      action_for        => {
+         r => {
+            action => sub { reverse_sort('open_tables'); },
+            label  => 'Reverse sort order',
+         },
+         s => {
+            action => sub { choose_sort_cols('open_tables'); },
+            label => "Choose sort column",
+         },
+      },
+      display_sub       => \&display_O,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(open_tables)],
+      visible_tables    => [qw(open_tables)],
+   },
+   Q => {
+      hdr        => 'Query List',
+      cust       => {},
+      note       => 'Shows queries from SHOW FULL PROCESSLIST',
+      action_for => {
+         a => {
+            action => sub { toggle_filter('processlist', 'hide_self') },
+            label  => 'Toggle the innotop process',
+         },
+         c => {
+            action => sub { edit_table('processlist') },
+            label  => 'Choose visible columns',
+         },
+         e => {
+            action => sub { analyze_query('e'); },
+            label  => "Explain a thread's query",
+         },
+         f => {
+            action => sub { analyze_query('f'); },
+            label  => "Show a thread's full query",
+         },
+         h => {
+            action => sub { toggle_visible_table('Q', 'q_header') },
+            label  => 'Toggle the header on and off',
+         },
+         i => {
+            action => sub { toggle_filter('processlist', 'hide_inactive') },
+            label  => 'Toggle idle processes',
+         },
+         k => {
+            action => sub { kill_query('CONNECTION') },
+            label => "Kill a query's connection",
+         },
+         r => {
+            action => sub { reverse_sort('processlist'); },
+            label  => 'Reverse sort order',
+         },
+         s => {
+            action => sub { choose_sort_cols('processlist'); },
+            label => "Change the display's sort column",
+         },
+         x => {
+            action => sub { kill_query('QUERY') },
+            label => "Kill a query",
+         },
+      },
+      display_sub       => \&display_Q,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(q_header processlist)],
+      visible_tables    => [qw(q_header processlist)],
+   },
+   R => {
+      hdr               => 'InnoDB Row Ops',
+      cust              => {},
+      note              => 'Shows InnoDB row operation and semaphore info',
+      action_for        => {
+         i => {
+            action => sub { toggle_config('status_inc') },
+            label  => 'Toggle incremental status display',
+         },
+      },
+      display_sub       => \&display_R,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(row_operations row_operation_misc semaphores wait_array)],
+      visible_tables    => [qw(row_operations row_operation_misc semaphores wait_array)],
+   },
+   S => {
+      hdr               => 'Variables & Status',
+      cust              => {},
+      note              => 'Shows query load statistics a la vmstat',
+      action_for        => {
+         '>' => {
+            action => sub { switch_var_set('S_set', 1) },
+            label  => 'Switch to next variable set',
+         },
+         '<' => {
+            action => sub { switch_var_set('S_set', -1) },
+            label  => 'Switch to prev variable set',
+         },
+         c => {
+            action => sub {
+               choose_var_set('S_set');
+               start_S_mode();
+            },
+            label => "Choose which set to display",
+         },
+         e => {
+            action => \&edit_current_var_set,
+            label  => 'Edit the current set of variables',
+         },
+         i => {
+            action => sub { $clear_screen_sub->(); toggle_config('status_inc') },
+            label  => 'Toggle incremental status display',
+         },
+         '-' => {
+            action => sub { set_display_precision(-1) },
+            label  => 'Decrease fractional display precision',
+         },
+         '+' => {
+            action => sub { set_display_precision(1) },
+            label  => 'Increase fractional display precision',
+         },
+         g => {
+            action => sub { set_s_mode('g') },
+            label  => 'Switch to graph (tload) view',
+         },
+         s => {
+            action => sub { set_s_mode('s') },
+            label  => 'Switch to standard (vmstat) view',
+         },
+         v => {
+            action => sub { set_s_mode('v') },
+            label  => 'Switch to pivoted view',
+         },
+      },
+      display_sub       => \&display_S,
+      no_clear_screen   => 1,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(var_status)],
+      visible_tables    => [qw(var_status)],
+   },
+   T => {
+      hdr        => 'InnoDB Txns',
+      cust       => {},
+      note       => 'Shows InnoDB transactions in top-like format',
+      action_for => {
+         a => {
+            action => sub { toggle_filter('innodb_transactions', 'hide_self') },
+            label  => 'Toggle the innotop process',
+         },
+         c => {
+            action => sub { edit_table('innodb_transactions') },
+            label  => 'Choose visible columns',
+         },
+         e => {
+            action => sub { analyze_query('e'); },
+            label  => "Explain a thread's query",
+         },
+         f => {
+            action => sub { analyze_query('f'); },
+            label  => "Show a thread's full query",
+         },
+         h => {
+            action => sub { toggle_visible_table('T', 't_header') },
+            label  => 'Toggle the header on and off',
+         },
+         i => {
+            action => sub { toggle_filter('innodb_transactions', 'hide_inactive') },
+            label  => 'Toggle inactive transactions',
+         },
+         k => {
+            action => sub { kill_query('CONNECTION') },
+            label  => "Kill a transaction's connection",
+         },
+         r => {
+            action => sub { reverse_sort('innodb_transactions'); },
+            label  => 'Reverse sort order',
+         },
+         s => {
+            action => sub { choose_sort_cols('innodb_transactions'); },
+            label  => "Change the display's sort column",
+         },
+         x => {
+            action => sub { kill_query('QUERY') },
+            label  => "Kill a query",
+         },
+      },
+      display_sub       => \&display_T,
+      connections       => [],
+      server_group      => '',
+      one_connection    => 0,
+      tables            => [qw(t_header innodb_transactions)],
+      visible_tables    => [qw(t_header innodb_transactions)],
+   },
+);
+
+# ###########################################################################
+# Global key mappings {{{3
+# Keyed on a single character, which is read from the keyboard.  Uppercase
+# letters switch modes.  Lowercase letters access commands when in a mode.
+# These can be overridden by action_for in %modes.
+# ###########################################################################
+my %action_for = (
+   '$' => {
+      action => \&edit_configuration,
+      label  => 'Edit configuration settings',
+   },
+   '?' => {
+      action => \&display_help,
+      label  => 'Show help',
+   },
+   '!' => {
+      action => \&display_license,
+      label  => 'Show license and warranty',
+   },
+   '^' => {
+      action => \&edit_table,
+      label  => "Edit the displayed table(s)",
+   },
+   '#' => {
+      action => \&choose_server_groups,
+      label  => 'Select/create server groups',
+   },
+   '@' => {
+      action => \&choose_servers,
+      label  => 'Select/create server connections',
+   },
+   '/' => {
+      action => \&add_quick_filter,
+      label  => 'Quickly filter what you see',
+   },
+   '\\' => {
+      action => \&clear_quick_filters,
+      label  => 'Clear quick-filters',
+   },
+   '%' => {
+      action => \&choose_filters,
+      label  => 'Choose and edit table filters',
+   },
+   "\t" => {
+      action => \&next_server_group,
+      label  => 'Switch to the next server group',
+      key    => 'TAB',
+   },
+   '=' => {
+      action => \&toggle_aggregate,
+      label  => 'Toggle aggregation',
+   },
+   # TODO: can these be auto-generated from %modes?
+   B => {
+      action => sub { switch_mode('B') },
+      label  => '',
+   },
+   C => {
+      action => sub { switch_mode('C') },
+      label  => '',
+   },
+   D => {
+      action => sub { switch_mode('D') },
+      label  => '',
+   },
+   F => {
+      action => sub { switch_mode('F') },
+      label  => '',
+   },
+   I => {
+      action => sub { switch_mode('I') },
+      label  => '',
+   },
+   L => {
+      action => sub { switch_mode('L') },
+      label  => '',
+   },
+   M => {
+      action => sub { switch_mode('M') },
+      label  => '',
+   },
+   O => {
+      action => sub { switch_mode('O') },
+      label  => '',
+   },
+   Q => {
+      action => sub { switch_mode('Q') },
+      label  => '',
+   },
+   R => {
+      action => sub { switch_mode('R') },
+      label  => '',
+   },
+   S => {
+      action => \&start_S_mode,
+      label  => '',
+   },
+   T => {
+      action => sub { switch_mode('T') },
+      label  => '',
+   },
+   d => {
+      action => sub { get_config_interactive('interval') },
+      label  => 'Change refresh interval',
+   },
+   n => { action => \&next_server,       label => 'Switch to the next connection' },
+   p => { action => \&pause,             label => 'Pause innotop', },
+   q => { action => \&finish,            label => 'Quit innotop', },
+);
+
+# ###########################################################################
+# Sleep times after certain statements {{{3
+# ###########################################################################
+my %stmt_sleep_time_for = ();
+
+# ###########################################################################
+# Config editor key mappings {{{3
+# ###########################################################################
+my %cfg_editor_action = (
+   c => {
+      note => 'Edit columns, etc in the displayed table(s)',
+      func => \&edit_table,
+   },
+   g => {
+      note => 'Edit general configuration',
+      func => \&edit_configuration_variables,
+   },
+   k => {
+      note => 'Edit row-coloring rules',
+      func => \&edit_color_rules,
+   },
+   p => {
+      note => 'Manage plugins',
+      func => \&edit_plugins,
+   },
+   s => {
+      note => 'Edit server groups',
+      func => \&edit_server_groups,
+   },
+   S => {
+      note => 'Edit SQL statement sleep delays',
+      func => \&edit_stmt_sleep_times,
+   },
+   t => {
+      note => 'Choose which table(s) to display in this mode',
+      func => \&choose_mode_tables,
+   },
+);
+
+# ###########################################################################
+# Color editor key mappings {{{3
+# ###########################################################################
+my %color_editor_action = (
+   n => {
+      note => 'Create a new color rule',
+      func => sub {
+         my ( $tbl, $idx ) = @_;
+         my $meta = $tbl_meta{$tbl};
+
+         $clear_screen_sub->();
+         my $col;
+         do {
+            $col = prompt_list(
+               'Choose the target column for the rule',
+               '',
+               sub { return keys %{$meta->{cols}} },
+               { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} });
+         } while ( !$col );
+         ( $col ) = grep { $_ } split(/\W+/, $col);
+         return $idx unless $col && exists $meta->{cols}->{$col};
+
+         $clear_screen_sub->();
+         my $op;
+         do {
+            $op = prompt_list(
+               'Choose the comparison operator for the rule',
+               '',
+               sub { return keys %comp_ops },
+               { map { $_ => $comp_ops{$_} } keys %comp_ops } );
+         } until ( $op );
+         $op =~ s/\s+//g;
+         return $idx unless $op && exists $comp_ops{$op};
+
+         my $arg;
+         do {
+            $arg = prompt('Specify an argument for the comparison');
+         } until defined $arg;
+
+         my $color;
+         do {
+            $color = prompt_list(
+               'Choose the color(s) the row should be when the rule matches',
+               '',
+               sub { return keys %ansicolors },
+               { map { $_ => $_ } keys %ansicolors } );
+         } until defined $color;
+         $color = join(' ', unique(grep { exists $ansicolors{$_} } split(/\W+/, $color)));
+         return $idx unless $color;
+
+         push @{$tbl_meta{$tbl}->{colors}}, {
+            col   => $col,
+            op    => $op,
+            arg   => $arg,
+            color => $color
+         };
+         $tbl_meta{$tbl}->{cust}->{colors} = 1;
+
+         return $idx;
+      },
+   },
+   d => {
+      note => 'Remove the selected rule',
+      func => sub {
+         my ( $tbl, $idx ) = @_;
+         my @rules = @{ $tbl_meta{$tbl}->{colors} };
+         return 0 unless @rules > 0 && $idx < @rules && $idx >= 0;
+         splice(@{$tbl_meta{$tbl}->{colors}}, $idx, 1);
+         $tbl_meta{$tbl}->{cust}->{colors} = 1;
+         return $idx == @rules ? $#rules : $idx;
+      },
+   },
+   j => {
+      note => 'Move highlight down one',
+      func => sub {
+         my ( $tbl, $idx ) = @_;
+         my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}};
+         return ($idx + 1) % $num_rules;
+      },
+   },
+   k => {
+      note => 'Move highlight up one',
+      func => sub {
+         my ( $tbl, $idx ) = @_;
+         my $num_rules = scalar @{$tbl_meta{$tbl}->{colors}};
+         return ($idx - 1) % $num_rules;
+      },
+   },
+   '+' => {
+      note => 'Move selected rule up one',
+      func => sub {
+         my ( $tbl, $idx ) = @_;
+         my $meta = $tbl_meta{$tbl};
+         my $dest = $idx == 0 ? scalar(@{$meta->{colors}} - 1) : $idx - 1;
+         my $temp = $meta->{colors}->[$idx];
+         $meta->{colors}->[$idx]  = $meta->{colors}->[$dest];
+         $meta->{colors}->[$dest] = $temp;
+         $meta->{cust}->{colors} = 1;
+         return $dest;
+      },
+   },
+   '-' => {
+      note => 'Move selected rule down one',
+      func => sub {
+         my ( $tbl, $idx ) = @_;
+         my $meta = $tbl_meta{$tbl};
+         my $dest = $idx == scalar(@{$meta->{colors}} - 1) ? 0 : $idx + 1;
+         my $temp = $meta->{colors}->[$idx];
+         $meta->{colors}->[$idx]  = $meta->{colors}->[$dest];
+         $meta->{colors}->[$dest] = $temp;
+         $meta->{cust}->{colors} = 1;
+         return $dest;
+      },
+   },
+);
+
+# ###########################################################################
+# Plugin editor key mappings {{{3
+# ###########################################################################
+my %plugin_editor_action = (
+   '*' => {
+      note => 'Toggle selected plugin active/inactive',
+      func => sub {
+         my ( $plugins, $idx ) = @_;
+         my $plugin = $plugins->[$idx];
+         $plugin->{active} = $plugin->{active} ? 0 : 1;
+         return $idx;
+      },
+   },
+   j => {
+      note => 'Move highlight down one',
+      func => sub {
+         my ( $plugins, $idx ) = @_;
+         return ($idx + 1) % scalar(@$plugins);
+      },
+   },
+   k => {
+      note => 'Move highlight up one',
+      func => sub {
+         my ( $plugins, $idx ) = @_;
+         return $idx == 0 ? @$plugins - 1 : $idx - 1;
+      },
+   },
+);
+
+# ###########################################################################
+# Table editor key mappings {{{3
+# ###########################################################################
+my %tbl_editor_action = (
+   a => {
+      note => 'Add a column to the table',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         my @visible_cols = @{ $tbl_meta{$tbl}->{visible} };
+         my %all_cols     = %{ $tbl_meta{$tbl}->{cols} };
+         delete @all_cols{@visible_cols};
+         my $choice = prompt_list(
+            'Choose a column',
+            '',
+            sub { return keys %all_cols; },
+            { map { $_ => $all_cols{$_}->{label} || $all_cols{$_}->{hdr} } keys %all_cols });
+         if ( $all_cols{$choice} ) {
+            push @{$tbl_meta{$tbl}->{visible}}, $choice;
+            $tbl_meta{$tbl}->{cust}->{visible} = 1;
+            return $choice;
+         }
+         return $col;
+      },
+   },
+   n => {
+      note => 'Create a new column and add it to the table',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+
+         $clear_screen_sub->();
+         print word_wrap("Choose a name for the column.  This name is not displayed, and is used only "
+               . "for internal reference.  It can contain only lowercase letters, numbers, "
+               . "and underscores.");
+         print "\n\n";
+         do {
+            $col = prompt("Enter column name");
+            $col = '' if $col =~ m/[^a-z0-9_]/;
+         } while ( !$col );
+
+         $clear_screen_sub->();
+         my $hdr;
+         do {
+            $hdr = prompt("Enter column header");
+         } while ( !$hdr );
+
+         $clear_screen_sub->();
+         print "Choose a source for the column's data\n\n";
+         my ( $src, $sub, $err );
+         do {
+            if ( $err ) {
+               print "Error: $err\n\n";
+            }
+            $src = prompt("Enter column source");
+            if ( $src ) {
+               ( $sub, $err ) = compile_expr($src);
+            }
+         } until ( !$err);
+
+         # TODO: this duplicates %col_props.
+         $tbl_meta{$tbl}->{cols}->{$col} = {
+            hdr   => $hdr,
+            src   => $src,
+            just  => '-',
+            num   => 0,
+            label => 'User-defined',
+            user  => 1,
+            tbl   => $tbl,
+            minw  => 0,
+            maxw  => 0,
+            trans => [],
+            func  => $sub,
+            dec   => 0,
+            agg   => 0,
+            aggonly => 0,
+         };
+
+         $tbl_meta{$tbl}->{visible} = [ unique(@{$tbl_meta{$tbl}->{visible}}, $col) ];
+         $tbl_meta{$tbl}->{cust}->{visible} = 1;
+         return $col;
+      },
+   },
+   d => {
+      note => 'Remove selected column',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         my @visible_cols = @{ $tbl_meta{$tbl}->{visible} };
+         my $idx          = 0;
+         return $col unless @visible_cols > 1;
+         while ( $visible_cols[$idx] ne $col ) {
+            $idx++;
+         }
+         $tbl_meta{$tbl}->{visible} = [ grep { $_ ne $col } @visible_cols ];
+         $tbl_meta{$tbl}->{cust}->{visible} = 1;
+         return $idx == $#visible_cols ? $visible_cols[$idx - 1] : $visible_cols[$idx + 1];
+      },
+   },
+   e => {
+      note => 'Edit selected column',
+      func => sub {
+         # TODO: make this editor hotkey-driven and give readline support.
+         my ( $tbl, $col ) = @_;
+         $clear_screen_sub->();
+         my $meta = $tbl_meta{$tbl}->{cols}->{$col};
+         my @prop = qw(hdr label src just num minw maxw trans agg); # TODO redundant
+
+         my $answer;
+         do {
+            # Do what the user asked...
+            if ( $answer && grep { $_ eq $answer } @prop ) {
+               # Some properties are arrays, others scalars.
+               my $ini = ref $col_props{$answer} ? join(' ', @{$meta->{$answer}}) : $meta->{$answer};
+               my $val = prompt("New value for $answer", undef, $ini);
+               $val = [ split(' ', $val) ] if ref($col_props{$answer});
+               if ( $answer eq 'trans' ) {
+                  $val = [ unique(grep{ exists $trans_funcs{$_} } @$val) ];
+               }
+               @{$meta}{$answer, 'user', 'tbl' } = ( $val, 1, $tbl );
+            }
+
+            my @display_lines = (
+               '',
+               "You are editing column $tbl.$col.\n",
+            );
+
+            push @display_lines, create_table2(
+               \@prop,
+               { map { $_ => $_ } @prop },
+               { map { $_ => ref $meta->{$_} eq 'ARRAY' ? join(' ', @{$meta->{$_}})
+                           : ref $meta->{$_}            ? '[expression code]'
+                           :                              $meta->{$_}
+                     } @prop
+               },
+               { sep => '  ' });
+            draw_screen(\@display_lines, { raw => 1 });
+            print "\n\n"; # One to add space, one to clear readline artifacts
+            $answer = prompt('Edit what? (q to quit)');
+         } while ( $answer ne 'q' );
+
+         return $col;
+      },
+   },
+   j => {
+      note => 'Move highlight down one',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         my @visible_cols = @{ $tbl_meta{$tbl}->{visible} };
+         my $idx          = 0;
+         while ( $visible_cols[$idx] ne $col ) {
+            $idx++;
+         }
+         return $visible_cols[ ($idx + 1) % @visible_cols ];
+      },
+   },
+   k => {
+      note => 'Move highlight up one',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         my @visible_cols = @{ $tbl_meta{$tbl}->{visible} };
+         my $idx          = 0;
+         while ( $visible_cols[$idx] ne $col ) {
+            $idx++;
+         }
+         return $visible_cols[ $idx - 1 ];
+      },
+   },
+   '+' => {
+      note => 'Move selected column up one',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         my $meta         = $tbl_meta{$tbl};
+         my @visible_cols = @{$meta->{visible}};
+         my $idx          = 0;
+         while ( $visible_cols[$idx] ne $col ) {
+            $idx++;
+         }
+         if ( $idx ) {
+            $visible_cols[$idx]     = $visible_cols[$idx - 1];
+            $visible_cols[$idx - 1] = $col;
+            $meta->{visible}        = \@visible_cols;
+         }
+         else {
+            shift @{$meta->{visible}};
+            push @{$meta->{visible}}, $col;
+         }
+         $meta->{cust}->{visible} = 1;
+         return $col;
+      },
+   },
+   '-' => {
+      note => 'Move selected column down one',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         my $meta         = $tbl_meta{$tbl};
+         my @visible_cols = @{$meta->{visible}};
+         my $idx          = 0;
+         while ( $visible_cols[$idx] ne $col ) {
+            $idx++;
+         }
+         if ( $idx == $#visible_cols ) {
+            unshift @{$meta->{visible}}, $col;
+            pop @{$meta->{visible}};
+         }
+         else {
+            $visible_cols[$idx]     = $visible_cols[$idx + 1];
+            $visible_cols[$idx + 1] = $col;
+            $meta->{visible}        = \@visible_cols;
+         }
+         $meta->{cust}->{visible} = 1;
+         return $col;
+      },
+   },
+   f => {
+      note => 'Choose filters',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         choose_filters($tbl);
+         return $col;
+      },
+   },
+   o => {
+      note => 'Edit color rules',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         edit_color_rules($tbl);
+         return $col;
+      },
+   },
+   s => {
+      note => 'Choose sort columns',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         choose_sort_cols($tbl);
+         return $col;
+      },
+   },
+   g => {
+      note => 'Choose group-by (aggregate) columns',
+      func => sub {
+         my ( $tbl, $col ) = @_;
+         choose_group_cols($tbl);
+         return $col;
+      },
+   },
+);
+
+# ###########################################################################
+# Global variables and environment {{{2
+# ###########################################################################
+
+my @this_term_size; # w_chars, h_chars, w_pix, h_pix
+my @last_term_size; # w_chars, h_chars, w_pix, h_pix
+my $char;
+my $windows       = $OSNAME =~ m/MSWin/;
+my $have_color    = 0;
+my $MAX_ULONG     = 4294967295; # 2^32-1
+my $num_regex     = qr/^[+-]?(?=\d|\.)\d*(?:\.\d+)?(?:E[+-]?\d+|)$/i;
+my $int_regex     = qr/^\d+$/;
+my $bool_regex    = qr/^[01]$/;
+my $term          = undef;
+my $file          = undef; # File to watch for InnoDB monitor output
+my $file_mtime    = undef; # Status of watched file
+my $file_data     = undef; # Last chunk of text read from file
+my $innodb_parser = InnoDBParser->new;
+
+my $nonfatal_errs = join('|',
+   'Access denied for user',
+   'Unknown MySQL server host',
+   'Unknown database',
+   'Can\'t connect to local MySQL server through socket',
+   'Can\'t connect to MySQL server on',
+   'MySQL server has gone away',
+   'Cannot call SHOW INNODB STATUS',
+   'Access denied',
+   'AutoCommit',
+);
+
+if ( !$opts{n} ) {
+   require Term::ReadLine;
+   $term = Term::ReadLine->new('innotop');
+}
+
+# Stores status, variables, innodb status, master/slave status etc.
+# Keyed on connection name.  Each entry is a hashref of current and past data sets,
+# keyed on clock tick.
+my %vars;
+my %info_gotten = (); # Which things have been retrieved for the current clock tick.
+
+# Stores info on currently displayed queries: cxn, connection ID, query text.
+my @current_queries;
+
+my $lines_printed       = 0;
+my $clock               = 0;   # Incremented with every wake-sleep cycle
+my $clearing_deadlocks  = 0;
+
+# Find the home directory; it's different on different OSes.
+my $homepath = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.';
+
+# If terminal coloring is available, use it.  The only function I want from
+# the module is the colored() function.
+eval {
+   if ( !$opts{n} ) {
+      if ( $windows ) {
+         require Win32::Console::ANSI;
+      }
+      require Term::ANSIColor;
+      import Term::ANSIColor qw(colored);
+      $have_color = 1;
+   }
+};
+if ( $EVAL_ERROR || $opts{n} ) {
+   # If there was an error, manufacture my own colored() function that does no
+   # coloring.
+   *colored = sub { pop @_; @_; };
+}
+
+if ( $opts{n} ) {
+   $clear_screen_sub = sub {};
+}
+elsif ( $windows ) {
+   $clear_screen_sub = sub { $lines_printed = 0; system("cls") };
+}
+else {
+   my $clear = `clear`;
+   $clear_screen_sub = sub { $lines_printed = 0; print $clear };
+}
+
+# ###########################################################################
+# Config storage. {{{2
+# ###########################################################################
+my %config = (
+   color => {
+      val  => $have_color,
+      note => 'Whether to use terminal coloring',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   cmd_filter => {
+      val  => 'Com_',
+      note => 'Prefix for values in C mode',
+      conf => [qw(C)],
+   },
+   plugin_dir => {
+      val  => "$homepath/.innotop/plugins",
+      note => 'Directory where plugins can be found',
+      conf => 'ALL',
+   },
+   show_percent => {
+      val  => 1,
+      note => 'Show the % symbol after percentages',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   skip_innodb => {
+      val  => 0,
+      note => 'Disable SHOW INNODB STATUS',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   S_func => {
+      val  => 's',
+      note => 'What to display in S mode: graph, status, pivoted status',
+      conf => [qw(S)],
+      pat  => qr/^[gsv]$/,
+   },
+   cxn_timeout => {
+      val  => 28800,
+      note => 'Connection timeout for keeping unused connections alive',
+      conf => 'ALL',
+      pat  => $int_regex,
+   },
+   graph_char => {
+      val  => '*',
+      note => 'Character for drawing graphs',
+      conf => [ qw(S) ],
+      pat  => qr/^.$/,
+   },
+   show_cxn_errors_in_tbl => {
+      val  => 1,
+      note => 'Whether to display connection errors as rows in the table',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   hide_hdr => {
+      val  => 0,
+      note => 'Whether to show column headers',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   show_cxn_errors => {
+      val  => 1,
+      note => 'Whether to print connection errors to STDOUT',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   readonly => {
+      val  => 0,
+      note => 'Whether the config file is read-only',
+      conf => [ qw() ],
+      pat  => $bool_regex,
+   },
+   global => {
+      val  => 1,
+      note => 'Whether to show GLOBAL variables and status',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   header_highlight => {
+      val  => 'bold',
+      note => 'How to highlight table column headers',
+      conf => 'ALL',
+      pat  => qr/^(?:bold|underline)$/,
+   },
+   display_table_captions => {
+      val  => 1,
+      note => 'Whether to put captions on tables',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   charset => {
+      val  => 'ascii',
+      note => 'What type of characters should be displayed in queries (ascii, unicode, none)',
+      conf => 'ALL',
+      pat  => qr/^(?:ascii|unicode|none)$/,
+   },
+   auto_wipe_dl => {
+      val  => 0,
+      note => 'Whether to auto-wipe InnoDB deadlocks',
+      conf => 'ALL',
+      pat  => $bool_regex,
+   },
+   max_height => {
+      val  => 30,
+      note => '[Win32] Max window height',
+      conf => 'ALL',
+   },
+   debug => {
+      val  => 0,
+      pat  => $bool_regex,
+      note => 'Debug mode (more verbose errors, uses more memory)',
+      conf => 'ALL',
+   },
+   num_digits => {
+      val  => 2,
+      pat  => $int_regex,
+      note => 'How many digits to show in fractional numbers and percents',
+      conf => 'ALL',
+   },
+   debugfile => {
+      val  => "$homepath/.innotop/core_dump",
+      note => 'A debug file in case you are interested in error output',
+   },
+   show_statusbar => {
+      val  => 1,
+      pat  => $bool_regex,
+      note => 'Whether to show the status bar in the display',
+      conf => 'ALL',
+   },
+   mode => {
+      val  => "T",
+      note => "Which mode to start in",
+      cmdline => 1,
+   },
+   status_inc => {
+      val  => 0,
+      note => 'Whether to show raw or incremental values for status variables',
+      pat  => $bool_regex,
+   },
+   interval => {
+      val  => 10,
+      pat  => qr/^(?:(?:\d*?[1-9]\d*(?:\.\d*)?)|(?:\d*\.\d*?[1-9]\d*))$/,
+      note => "The interval at which the display will be refreshed.  Fractional values allowed.",
+   },
+   num_status_sets => {
+      val  => 9,
+      pat  => $int_regex,
+      note => 'How many sets of STATUS and VARIABLES values to show',
+      conf => [ qw(S) ],
+   },
+   S_set => {
+      val  => 'general',
+      pat  => qr/^\w+$/,
+      note => 'Which set of variables to display in S (Variables & Status) mode',
+      conf => [ qw(S) ],
+   },
+);
+
+# ###########################################################################
+# Config file sections {{{2
+# The configuration file is broken up into sections like a .ini file.  This
+# variable defines those sections and the subroutines responsible for reading
+# and writing them.
+# ###########################################################################
+my %config_file_sections = (
+   plugins => {
+      reader => \&load_config_plugins,
+      writer => \&save_config_plugins,
+   },
+   group_by => {
+      reader => \&load_config_group_by,
+      writer => \&save_config_group_by,
+   },
+   filters => {
+      reader => \&load_config_filters,
+      writer => \&save_config_filters,
+   },
+   active_filters => {
+      reader => \&load_config_active_filters,
+      writer => \&save_config_active_filters,
+   },
+   visible_tables => {
+      reader => \&load_config_visible_tables,
+      writer => \&save_config_visible_tables,
+   },
+   sort_cols => {
+      reader => \&load_config_sort_cols,
+      writer => \&save_config_sort_cols,
+   },
+   active_columns => {
+      reader => \&load_config_active_columns,
+      writer => \&save_config_active_columns,
+   },
+   tbl_meta => {
+      reader => \&load_config_tbl_meta,
+      writer => \&save_config_tbl_meta,
+   },
+   general => {
+      reader => \&load_config_config,
+      writer => \&save_config_config,
+   },
+   connections => {
+      reader => \&load_config_connections,
+      writer => \&save_config_connections,
+   },
+   active_connections => {
+      reader => \&load_config_active_connections,
+      writer => \&save_config_active_connections,
+   },
+   server_groups => {
+      reader => \&load_config_server_groups,
+      writer => \&save_config_server_groups,
+   },
+   active_server_groups => {
+      reader => \&load_config_active_server_groups,
+      writer => \&save_config_active_server_groups,
+   },
+   max_values_seen => {
+      reader => \&load_config_mvs,
+      writer => \&save_config_mvs,
+   },
+   varsets => {
+      reader => \&load_config_varsets,
+      writer => \&save_config_varsets,
+   },
+   colors => {
+      reader => \&load_config_colors,
+      writer => \&save_config_colors,
+   },
+   stmt_sleep_times => {
+      reader => \&load_config_stmt_sleep_times,
+      writer => \&save_config_stmt_sleep_times,
+   },
+);
+
+# Config file sections have some dependencies, so they have to be read/written in order.
+my @ordered_config_file_sections = qw(general plugins filters active_filters tbl_meta
+   connections active_connections server_groups active_server_groups max_values_seen
+   active_columns sort_cols visible_tables varsets colors stmt_sleep_times
+   group_by);
+
+# All events for which plugins may register themselves.  Entries are arrayrefs.
+my %event_listener_for = map { $_ => [] }
+   qw(
+      extract_values
+      set_to_tbl_pre_filter set_to_tbl_pre_sort set_to_tbl_pre_group
+      set_to_tbl_pre_colorize set_to_tbl_pre_transform set_to_tbl_pre_pivot
+      set_to_tbl_pre_create set_to_tbl_post_create
+      draw_screen
+   );
+
+# All variables to which plugins have access.
+my %pluggable_vars = (
+   action_for    => \%action_for,
+   agg_funcs     => \%agg_funcs,
+   config        => \%config,
+   connections   => \%connections,
+   dbhs          => \%dbhs,
+   filters       => \%filters,
+   modes         => \%modes,
+   server_groups => \%server_groups,
+   tbl_meta      => \%tbl_meta,
+   trans_funcs   => \%trans_funcs,
+   var_sets      => \%var_sets,
+);
+
+# ###########################################################################
+# Contains logic to generate prepared statements for a given function for a
+# given DB connection.  Returns a $sth.
+# ###########################################################################
+my %stmt_maker_for = (
+   INNODB_STATUS => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare(version_ge( $dbh, '5.0.0' )
+             ? 'SHOW ENGINE INNODB STATUS'
+             : 'SHOW INNODB STATUS');
+   },
+   SHOW_VARIABLES => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '4.0.3' )
+             ? 'SHOW GLOBAL VARIABLES'
+             : 'SHOW VARIABLES');
+   },
+   SHOW_STATUS => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare($config{global}->{val} && version_ge( $dbh, '5.0.2' )
+             ? 'SHOW GLOBAL STATUS'
+             : 'SHOW STATUS');
+   },
+   KILL_QUERY => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare(version_ge( $dbh, '5.0.0' )
+             ? 'KILL QUERY ?'
+             : 'KILL ?');
+   },
+   SHOW_MASTER_LOGS => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare('SHOW MASTER LOGS');
+   },
+   SHOW_MASTER_STATUS => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare('SHOW MASTER STATUS');
+   },
+   SHOW_SLAVE_STATUS => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare('SHOW SLAVE STATUS');
+   },
+   KILL_CONNECTION => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare(version_ge( $dbh, '5.0.0' )
+             ? 'KILL CONNECTION ?'
+             : 'KILL ?');
+   },
+   OPEN_TABLES => sub {
+      my ( $dbh ) = @_;
+      return version_ge($dbh, '4.0.0')
+         ? $dbh->prepare('SHOW OPEN TABLES')
+         : undef;
+   },
+   PROCESSLIST => sub {
+      my ( $dbh ) = @_;
+      return $dbh->prepare('SHOW FULL PROCESSLIST');
+   },
+);
+
+# Plugins!
+my %plugins = (
+);
+
+# ###########################################################################
+# Run the program {{{1
+# ###########################################################################
+
+# This config variable is only useful for MS Windows because its terminal
+# can't tell how tall it is.
+if ( !$windows ) {
+   delete $config{max_height};
+}
+
+# Try to lower my priority.
+eval { setpriority(0, 0, getpriority(0, 0) + 10); };
+
+# Print stuff to the screen immediately, don't wait for a newline.
+$OUTPUT_AUTOFLUSH = 1;
+
+# Clear the screen and load the configuration.
+$clear_screen_sub->();
+load_config();
+post_process_tbl_meta();
+
+# Make sure no changes are written to config file in non-interactive mode.
+if ( $opts{n} ) {
+   $config{readonly}->{val} = 1;
+}
+
+eval {
+
+   # Open the file for InnoDB status
+   if ( @ARGV ) {
+      my $filename = shift @ARGV;
+      open $file, "<", $filename
+         or die "Cannot open '$filename': $OS_ERROR";
+   }
+
+   # In certain modes we might have to collect data for two cycles
+   # before printing anything out, so we need to bump up the count one.
+   if ( $opts{n} && $opts{count} && $config{status_inc}->{val}
+      && $config{mode}->{val} =~ m/[S]/ )
+   {
+      $opts{count}++;
+   }
+
+   while (++$clock) {
+
+      my $mode = $config{mode}->{val} || 'T';
+      if ( !$modes{$mode} ) {
+         die "Mode '$mode' doesn't exist; try one of these:\n"
+            . join("\n", map { "  $_ $modes{$_}->{hdr}" }  sort keys %modes)
+            . "\n";
+      }
+
+      if ( !$opts{n} ) {
+         @last_term_size = @this_term_size;
+         @this_term_size = Term::ReadKey::GetTerminalSize(\*STDOUT);
+         if ( $windows ) {
+            $this_term_size[0]--;
+            $this_term_size[1]
+               = min($this_term_size[1], $config{max_height}->{val});
+         }
+         die("Can't read terminal size") unless @this_term_size;
+      }
+
+      # If there's no connection to a database server, we need to fix that...
+      if ( !%connections ) {
+         print "You have not defined any database connections.\n\n";
+         add_new_dsn();
+      }
+
+      # See whether there are any connections defined for this mode.  If there's only one
+      # connection total, assume the user wants to just use innotop for a single server
+      # and don't ask which server to connect to.  Also, if we're monitoring from a file,
+      # we just use the first connection.
+      if ( !get_connections() ) {
+         if ( $file || 1 == scalar keys %connections ) {
+            $modes{$config{mode}->{val}}->{connections} = [ keys %connections ];
+         }
+         else {
+            choose_connections();
+         }
+      }
+
+      # Term::ReadLine might have re-set $OUTPUT_AUTOFLUSH.
+      $OUTPUT_AUTOFLUSH = 1;
+
+      # Prune old data
+      my $sets = $config{num_status_sets}->{val};
+      foreach my $store ( values %vars ) {
+         delete @{$store}{ grep { $_ < $clock - $sets } keys %$store };
+      }
+      %info_gotten = ();
+
+      # Call the subroutine to display this mode.
+      $modes{$mode}->{display_sub}->();
+
+      # It may be time to quit now.
+      if ( $opts{count} && $clock >= $opts{count} ) {
+         finish();
+      }
+
+      # Wait for a bit.
+      if ( $opts{n} ) {
+         sleep($config{interval}->{val});
+      }
+      else {
+         ReadMode('cbreak');
+         $char = ReadKey($config{interval}->{val});
+         ReadMode('normal');
+      }
+
+      # Handle whatever action the key indicates.
+      do_key_action();
+
+   }
+};
+if ( $EVAL_ERROR ) {
+   core_dump( $EVAL_ERROR );
+}
+finish();
+
+# Subroutines {{{1
+# Mode functions{{{2
+# switch_mode {{{3
+sub switch_mode {
+   my $mode = shift;
+   $config{mode}->{val} = $mode;
+}
+
+# Prompting functions {{{2
+# prompt_list {{{3
+# Prompts the user for a value, given a question, initial value,
+# a completion function and a hashref of hints.
+sub prompt_list {
+   die "Can't call in non-interactive mode" if $opts{n};
+   my ( $question, $init, $completion, $hints ) = @_;
+   if ( $hints ) {
+      # Figure out how wide the table will be
+      my $max_name = max(map { length($_) } keys %$hints );
+      $max_name ||= 0;
+      $max_name +=  3;
+      my @meta_rows = create_table2(
+               [ sort keys %$hints ],
+               { map { $_ => $_ } keys %$hints },
+               { map { $_ => trunc($hints->{$_}, $this_term_size[0] - $max_name) } keys %$hints },
+               { sep => '  ' });
+      if (@meta_rows > 10) {
+         # Try to split and stack the meta rows next to each other
+         my $split = int(@meta_rows / 2);
+         @meta_rows = stack_next(
+            [@meta_rows[0..$split - 1]],
+            [@meta_rows[$split..$#meta_rows]],
+            { pad => ' | '},
+         );
+      }
+      print join( "\n",
+         '',
+         map { ref $_ ? colored(@$_) : $_ } create_caption('Choose from', @meta_rows), ''),
+         "\n";
+   }
+   $term->Attribs->{completion_function} = $completion;
+   my $answer = $term->readline("$question: ", $init);
+   $OUTPUT_AUTOFLUSH = 1;
+   $answer = '' if !defined($answer);
+   $answer =~ s/\s+$//;
+   return $answer;
+}
+
+# prompt {{{3
+# Prints out a prompt and reads from the keyboard, then validates with the
+# validation regex until the input is correct.
+sub prompt {
+   die "Can't call in non-interactive mode" if $opts{n};
+   my ( $prompt, $regex, $init, $completion ) = @_;
+   my $response;
+   my $success = 0;
+   do {
+      if ( $completion ) {
+         $term->Attribs->{completion_function} = $completion;
+      }
+      $response = $term->readline("$prompt: ", $init);
+      if ( $regex && $response !~ m/$regex/ ) {
+         print "Invalid response.\n\n";
+      }
+      else {
+         $success = 1;
+      }
+   } while ( !$success );
+   $OUTPUT_AUTOFLUSH = 1;
+   $response =~ s/\s+$//;
+   return $response;
+}
+
+# prompt_noecho {{{3
+# Unfortunately, suppressing echo with Term::ReadLine isn't reliable; the user might not
+# have that library, or it might not support that feature.
+sub prompt_noecho {
+   my ( $prompt ) = @_;
+   print colored("$prompt: ", 'underline');
+   my $response;
+   ReadMode('noecho');
+   $response = <STDIN>;
+   chomp($response);
+   ReadMode('normal');
+   return $response;
+}
+
+# do_key_action {{{3
+# Depending on whether a key was read, do something.  Keys have certain
+# actions defined in lookup tables.  Each mode may have its own lookup table,
+# which trumps the global table -- so keys can be context-sensitive.  The key
+# may be read and written in a subroutine, so it's a global.
+sub do_key_action {
+   if ( defined $char ) {
+      my $mode = $config{mode}->{val};
+      my $action
+         = defined($modes{$mode}->{action_for}->{$char})
+         ? $modes{$mode}->{action_for}->{$char}->{action}
+         : defined($action_for{$char})
+         ? $action_for{$char}->{action}
+         : sub{};
+      $action->();
+   }
+}
+
+# pause {{{3
+sub pause {
+   die "Can't call in non-interactive mode" if $opts{n};
+   my $msg = shift;
+   print defined($msg) ? "\n$msg" : "\nPress any key to continue";
+   ReadMode('cbreak');
+   my $char = ReadKey(0);
+   ReadMode('normal');
+   return $char;
+}
+
+# reverse_sort {{{3
+sub reverse_sort {
+   my $tbl = shift;
+   $tbl_meta{$tbl}->{sort_dir} *= -1;
+}
+
+# select_cxn {{{3
+# Selects connection(s).  If the mode (or argument list) has only one, returns
+# it without prompt.
+sub select_cxn {
+   my ( $prompt, @cxns ) = @_;
+   if ( !@cxns ) {
+      @cxns = get_connections();
+   }
+   if ( @cxns == 1 ) {
+      return $cxns[0];
+   }
+   my $choices = prompt_list(
+         $prompt,
+         $cxns[0],
+         sub{ return @cxns },
+         { map { $_ => $connections{$_}->{dsn} } @cxns });
+   my @result = unique(grep { my $a = $_; grep { $_ eq $a } @cxns } split(/\s+/, $choices));
+   return @result;
+}
+
+# kill_query {{{3
+# Kills a connection, or on new versions, optionally a query but not connection.
+sub kill_query {
+   my ( $q_or_c ) = @_;
+
+   my $info = choose_thread(
+      sub { 1 },
+      'Select a thread to kill the ' . $q_or_c,
+   );
+   return unless $info;
+   return unless pause("Kill $info->{id}?") =~ m/y/i;
+
+   eval {
+      do_stmt($info->{cxn}, $q_or_c eq 'QUERY' ? 'KILL_QUERY' : 'KILL_CONNECTION', $info->{id} );
+   };
+
+   if ( $EVAL_ERROR ) {
+      print "\nError: $EVAL_ERROR";
+      pause();
+   }
+}
+
+# set_display_precision {{{3
+sub set_display_precision {
+   my $dir = shift;
+   $config{num_digits}->{val} = min(9, max(0, $config{num_digits}->{val} + $dir));
+}
+
+sub toggle_visible_table {
+   my ( $mode, $table ) = @_;
+   my $visible = $modes{$mode}->{visible_tables};
+   if ( grep { $_ eq $table } @$visible ) {
+      $modes{$mode}->{visible_tables} = [ grep { $_ ne $table } @$visible ];
+   }
+   else {
+      unshift @$visible, $table;
+   }
+   $modes{$mode}->{cust}->{visible_tables} = 1;
+}
+
+# toggle_filter{{{3
+sub toggle_filter {
+   my ( $tbl, $filter ) = @_;
+   my $filters = $tbl_meta{$tbl}->{filters};
+   if ( grep { $_ eq $filter } @$filters ) {
+      $tbl_meta{$tbl}->{filters} = [ grep { $_ ne $filter } @$filters ];
+   }
+   else {
+      push @$filters, $filter;
+   }
+   $tbl_meta{$tbl}->{cust}->{filters} = 1;
+}
+
+# toggle_config {{{3
+sub toggle_config {
+   my ( $key ) = @_;
+   $config{$key}->{val} ^= 1;
+}
+
+# create_deadlock {{{3
+sub create_deadlock {
+   $clear_screen_sub->();
+
+   print "This function will deliberately cause a small deadlock, "
+      . "clearing deadlock information from the InnoDB monitor.\n\n";
+
+   my $answer = prompt("Are you sure you want to proceed?  Say 'y' if you do");
+   return 0 unless $answer eq 'y';
+
+   my ( $cxn ) = select_cxn('Clear on which server? ');
+   return unless $cxn && exists($connections{$cxn});
+
+   clear_deadlock($cxn);
+}
+
+# deadlock_thread {{{3
+sub deadlock_thread {
+   my ( $id, $tbl, $cxn ) = @_;
+
+   eval {
+      my $dbh = get_new_db_connection($cxn, 1);
+      my @stmts = (
+         "set transaction isolation level serializable",
+         (version_ge($dbh, '4.0.11') ? "start transaction" : 'begin'),
+         "select * from $tbl where a = $id",
+         "update $tbl set a = $id where a <> $id",
+      );
+
+      foreach my $stmt (@stmts[0..2]) {
+         $dbh->do($stmt);
+      }
+      sleep(1 + $id);
+      $dbh->do($stmts[-1]);
+   };
+   if ( $EVAL_ERROR ) {
+      if ( $EVAL_ERROR !~ m/Deadlock found/ ) {
+         die $EVAL_ERROR;
+      }
+   }
+   exit(0);
+}
+
+# Purges unused binlogs on the master, up to but not including the latest log.
+# TODO: guess which connections are slaves of a given master.
+sub purge_master_logs {
+   my @cxns = get_connections();
+
+   get_master_slave_status(@cxns);
+
+   # Toss out the rows that don't have master/slave status...
+   my @vars =
+      grep { $_ && ($_->{file} || $_->{master_host}) }
+      map  { $vars{$_}->{$clock} } @cxns;
+   @cxns = map { $_->{cxn} } @vars;
+
+   # Figure out which master to purge ons.
+   my @masters = map { $_->{cxn} } grep { $_->{file} } @vars;
+   my ( $master ) = select_cxn('Which master?', @masters );
+   return unless $master;
+   my ($master_status) = grep { $_->{cxn} eq $master } @vars;
+
+   # Figure out the result order (not lexical order) of master logs.
+   my @master_logs = get_master_logs($master);
+   my $i = 0;
+   my %master_logs = map { $_->{log_name} => $i++ } @master_logs;
+
+   # Ask which slave(s) are reading from this master.
+   my @slave_status = grep { $_->{master_host} } @vars;
+   my @slaves = map { $_->{cxn} } @slave_status;
+   @slaves = select_cxn("Which slaves are reading from $master?", @slaves);
+   @slave_status = grep { my $item = $_; grep { $item->{cxn} eq $_ } @slaves } @slave_status;
+   return unless @slave_status;
+
+   # Find the minimum binary log in use.
+   my $min_log = min(map { $master_logs{$_->{master_log_file}} } @slave_status);
+   my $log_name = $master_logs[$min_log]->{log_name};
+
+   my $stmt = "PURGE MASTER LOGS TO '$log_name'";
+   send_cmd_to_servers($stmt, 0, 'PURGE {MASTER | BINARY} LOGS {TO "log_name" | BEFORE "date"}', [$master]);
+}
+
+sub send_cmd_to_servers {
+   my ( $cmd, $all, $hint, $cxns ) = @_;
+   if ( $all ) {
+      @$cxns = get_connections();
+   }
+   elsif ( !@$cxns ) {
+      @$cxns = select_cxn('Which servers?', @$cxns);
+   }
+   if ( $hint ) {
+      print "\nHint: $hint\n";
+   }
+   $cmd = prompt('Command to send', undef, $cmd);
+   foreach my $cxn ( @$cxns ) {
+      eval {
+         my $sth = do_query($cxn, $cmd);
+      };
+      if ( $EVAL_ERROR ) {
+         print "Error from $cxn: $EVAL_ERROR\n";
+      }
+      else {
+         print "Success on $cxn\n";
+      }
+   }
+   pause();
+}
+
+# Display functions {{{2
+
+sub set_s_mode {
+   my ( $func ) = @_;
+   $clear_screen_sub->();
+   $config{S_func}->{val} = $func;
+}
+
+# start_S_mode {{{3
+sub start_S_mode {
+   $clear_screen_sub->();
+   switch_mode('S');
+}
+
+# display_B {{{3
+sub display_B {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_innodb_status(\@cxns);
+
+   my @buffer_pool;
+   my @page_statistics;
+   my @insert_buffers;
+   my @adaptive_hash_index;
+   my %rows_for = (
+      buffer_pool         => \@buffer_pool,
+      page_statistics     => \@page_statistics,
+      insert_buffers      => \@insert_buffers,
+      adaptive_hash_index => \@adaptive_hash_index,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   foreach my $cxn ( @cxns ) {
+      my $set = $vars{$cxn}->{$clock};
+      my $pre = $vars{$cxn}->{$clock-1} || $set;
+
+      if ( $set->{IB_bp_complete} ) {
+         if ( $wanted{buffer_pool} ) {
+            push @buffer_pool, extract_values($set, $set, $pre, 'buffer_pool');
+         }
+         if ( $wanted{page_statistics} ) {
+            push @page_statistics, extract_values($set, $set, $pre, 'page_statistics');
+         }
+      }
+      if ( $set->{IB_ib_complete} ) {
+         if ( $wanted{insert_buffers} ) {
+            push @insert_buffers, extract_values(
+               $config{status_inc}->{val} ? inc(0, $cxn) : $set, $set, $pre,
+               'insert_buffers');
+         }
+         if ( $wanted{adaptive_hash_index} ) {
+            push @adaptive_hash_index, extract_values($set, $set, $pre, 'adaptive_hash_index');
+         }
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_C {{{3
+sub display_C {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_status_info(@cxns);
+
+   my @cmd_summary;
+   my %rows_for = (
+      cmd_summary => \@cmd_summary,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   # For now, I'm manually pulling these variables out and pivoting.  Eventually a SQL-ish
+   # dialect should let me join a table to a grouped and pivoted table and do this more easily.
+   # TODO: make it so.
+   my $prefix = qr/^$config{cmd_filter}->{val}/; # TODO: this is a total hack
+   my @values;
+   my ($total, $last_total) = (0, 0);
+   foreach my $cxn ( @cxns ) {
+      my $set = $vars{$cxn}->{$clock};
+      my $pre = $vars{$cxn}->{$clock-1} || $set;
+      foreach my $key ( keys %$set ) {
+         next unless $key =~ m/$prefix/i;
+         my $val = $set->{$key};
+         next unless defined $val && $val =~ m/^\d+$/;
+         my $last_val = $val - ($pre->{$key} || 0);
+         $total      += $val;
+         $last_total += $last_val;
+         push @values, {
+            name       => $key,
+            value      => $val,
+            last_value => $last_val,
+         };
+      }
+   }
+
+   # Add aggregation and turn into a real set TODO: total hack
+   if ( $wanted{cmd_summary} ) {
+      foreach my $value ( @values ) {
+         @{$value}{qw(total last_total)} = ($total, $last_total);
+         push @cmd_summary, extract_values($value, $value, $value, 'cmd_summary');
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_D {{{3
+sub display_D {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_innodb_status(\@cxns);
+
+   my @deadlock_transactions;
+   my @deadlock_locks;
+   my %rows_for = (
+      deadlock_transactions => \@deadlock_transactions,
+      deadlock_locks        => \@deadlock_locks,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   foreach my $cxn ( @cxns ) {
+      my $innodb_status = $vars{$cxn}->{$clock};
+      my $prev_status   = $vars{$cxn}->{$clock-1} || $innodb_status;
+
+      if ( $innodb_status->{IB_dl_timestring} ) {
+
+         my $victim = $innodb_status->{IB_dl_rolled_back} || 0;
+
+         if ( %wanted ) {
+            foreach my $txn_id ( keys %{$innodb_status->{IB_dl_txns}} ) {
+               my $txn = $innodb_status->{IB_dl_txns}->{$txn_id};
+               my $pre = $prev_status->{IB_dl_txns}->{$txn_id} || $txn;
+
+               if ( $wanted{deadlock_transactions} ) {
+                  my $hash = extract_values($txn->{tx}, $txn->{tx}, $pre->{tx}, 'deadlock_transactions');
+                  $hash->{cxn}        = $cxn;
+                  $hash->{dl_txn_num} = $txn_id;
+                  $hash->{victim}     = $txn_id == $victim ? 'Yes' : 'No';
+                  $hash->{timestring} = $innodb_status->{IB_dl_timestring};
+                  $hash->{truncates}  = $innodb_status->{IB_dl_complete} ? 'No' : 'Yes';
+                  push @deadlock_transactions, $hash;
+               }
+
+               if ( $wanted{deadlock_locks} ) {
+                  foreach my $lock ( @{$txn->{locks}} ) {
+                     my $hash = extract_values($lock, $lock, $lock, 'deadlock_locks');
+                     $hash->{dl_txn_num}      = $txn_id;
+                     $hash->{cxn}             = $cxn;
+                     $hash->{mysql_thread_id} = $txn->{tx}->{mysql_thread_id};
+                     push @deadlock_locks, $hash;
+                  }
+               }
+
+            }
+         }
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_F {{{3
+sub display_F {
+   my @display_lines;
+   my ( $cxn ) = get_connections();
+   get_innodb_status([$cxn]);
+   my $innodb_status = $vars{$cxn}->{$clock};
+
+   if ( $innodb_status->{IB_fk_timestring} ) {
+
+      push @display_lines, 'Reason: ' . $innodb_status->{IB_fk_reason};
+
+      # Display FK errors caused by invalid DML.
+      if ( $innodb_status->{IB_fk_txn} ) {
+         my $txn = $innodb_status->{IB_fk_txn};
+         push @display_lines,
+            '',
+            "User $txn->{user} from $txn->{hostname}, thread $txn->{mysql_thread_id} was executing:",
+            '', no_ctrl_char($txn->{query_text});
+      }
+
+      my @fk_table = create_table2(
+         $tbl_meta{fk_error}->{visible},
+         meta_to_hdr('fk_error'),
+         extract_values($innodb_status, $innodb_status, $innodb_status, 'fk_error'),
+         { just => '-', sep => '  '});
+      push @display_lines, '', @fk_table;
+
+   }
+   else {
+      push @display_lines, '', 'No foreign key error data.';
+   }
+   draw_screen(\@display_lines, { raw => 1 } );
+}
+
+# display_I {{{3
+sub display_I {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_innodb_status(\@cxns);
+
+   my @io_threads;
+   my @pending_io;
+   my @file_io_misc;
+   my @log_statistics;
+   my %rows_for = (
+      io_threads     => \@io_threads,
+      pending_io     => \@pending_io,
+      file_io_misc   => \@file_io_misc,
+      log_statistics => \@log_statistics,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   foreach my $cxn ( @cxns ) {
+      my $set = $vars{$cxn}->{$clock};
+      my $pre = $vars{$cxn}->{$clock-1} || $set;
+
+      if ( $set->{IB_io_complete} ) {
+         if ( $wanted{io_threads} ) {
+            my $cur_threads = $set->{IB_io_threads};
+            my $pre_threads = $pre->{IB_io_threads} || $cur_threads;
+            foreach my $key ( sort keys %$cur_threads ) {
+               my $cur_thd = $cur_threads->{$key};
+               my $pre_thd = $pre_threads->{$key} || $cur_thd;
+               my $hash = extract_values($cur_thd, $cur_thd, $pre_thd, 'io_threads');
+               $hash->{cxn} = $cxn;
+               push @io_threads, $hash;
+            }
+         }
+         if ( $wanted{pending_io} ) {
+            push @pending_io, extract_values($set, $set, $pre, 'pending_io');
+         }
+         if ( $wanted{file_io_misc} ) {
+            push @file_io_misc, extract_values(
+               $config{status_inc}->{val} ? inc(0, $cxn) : $set,
+               $set, $pre, 'file_io_misc');
+         }
+      }
+      if ( $set->{IB_lg_complete} && $wanted{log_statistics} ) {
+         push @log_statistics, extract_values($set, $set, $pre, 'log_statistics');
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_L {{{3
+sub display_L {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_innodb_status(\@cxns);
+
+   my @innodb_locks;
+   my %rows_for = (
+      innodb_locks => \@innodb_locks,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   # Get info on locks
+   foreach my $cxn ( @cxns ) {
+      my $set = $vars{$cxn}->{$clock} or next;
+      my $pre = $vars{$cxn}->{$clock-1} || $set;
+
+      if ( $wanted{innodb_locks} && defined $set->{IB_tx_transactions} && @{$set->{IB_tx_transactions}} ) {
+
+         my $cur_txns = $set->{IB_tx_transactions};
+         my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns;
+         my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns;
+         my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns;
+         foreach my $txn ( @$cur_txns ) {
+            foreach my $lock ( @{$txn->{locks}} ) {
+               my %hash = map { $_ => $txn->{$_} } qw(txn_id mysql_thread_id lock_wait_time active_secs);
+               map { $hash{$_} = $lock->{$_} } qw(lock_type space_id page_no n_bits index db table txn_id lock_mode special insert_intention waiting);
+               $hash{cxn} = $cxn;
+               push @innodb_locks, extract_values(\%hash, \%hash, \%hash, 'innodb_locks');
+            }
+         }
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_M {{{3
+sub display_M {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_master_slave_status(@cxns);
+   get_status_info(@cxns);
+
+   my @slave_sql_status;
+   my @slave_io_status;
+   my @master_status;
+   my %rows_for = (
+      slave_sql_status => \@slave_sql_status,
+      slave_io_status  => \@slave_io_status,
+      master_status    => \@master_status,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   foreach my $cxn ( @cxns ) {
+      my $set  = $config{status_inc}->{val} ? inc(0, $cxn) : $vars{$cxn}->{$clock};
+      my $pre  = $vars{$cxn}->{$clock - 1} || $set;
+      if ( $wanted{slave_sql_status} ) {
+         push @slave_sql_status, extract_values($set, $set, $pre, 'slave_sql_status');
+      }
+      if ( $wanted{slave_io_status} ) {
+         push @slave_io_status, extract_values($set, $set, $pre, 'slave_io_status');
+      }
+      if ( $wanted{master_status} ) {
+         push @master_status, extract_values($set, $set, $pre, 'master_status');
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_O {{{3
+sub display_O {
+   my @display_lines = ('');
+   my @cxns          = get_connections();
+   my @open_tables   = get_open_tables(@cxns);
+   my @tables = map { extract_values($_, $_, $_, 'open_tables') } @open_tables;
+   push @display_lines, set_to_tbl(\@tables, 'open_tables'), get_cxn_errors(@cxns);
+   draw_screen(\@display_lines);
+}
+
+# display_Q {{{3
+sub display_Q {
+   my @display_lines;
+
+   my @q_header;
+   my @processlist;
+   my %rows_for = (
+      q_header    => \@q_header,
+      processlist => \@processlist,
+   );
+
+   my @visible = $opts{n} ? 'processlist' : get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   # Get the data
+   my @cxns             = get_connections();
+   my @full_processlist = get_full_processlist(@cxns);
+
+   # Create header
+   if ( $wanted{q_header} ) {
+      get_status_info(@cxns);
+      foreach my $cxn ( @cxns ) {
+         my $set = $vars{$cxn}->{$clock};
+         my $pre = $vars{$cxn}->{$clock-1} || $set;
+         my $hash = extract_values($set, $set, $pre, 'q_header');
+         $hash->{cxn} = $cxn;
+         $hash->{when} = 'Total';
+         push @q_header, $hash;
+
+         if ( exists $vars{$cxn}->{$clock - 1} ) {
+            my $inc = inc(0, $cxn);
+            my $hash = extract_values($inc, $set, $pre, 'q_header');
+            $hash->{cxn} = $cxn;
+            $hash->{when} = 'Now';
+            push @q_header, $hash;
+         }
+      }
+   }
+
+   if ( $wanted{processlist} ) {
+      # TODO: save prev values
+      push @processlist, map { extract_values($_, $_, $_, 'processlist') } @full_processlist;
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      next unless $wanted{$tbl};
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   # Save queries in global variable for analysis.  The rows in %rows_for have been
+   # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows
+   # that get pushed to the screen.
+   @current_queries = map {
+      my %hash;
+      @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db info secs) };
+      \%hash;
+   } @{$rows_for{processlist}};
+
+   draw_screen(\@display_lines);
+}
+
+# display_R {{{3
+sub display_R {
+   my @display_lines;
+   my @cxns = get_connections();
+   get_innodb_status(\@cxns);
+
+   my @row_operations;
+   my @row_operation_misc;
+   my @semaphores;
+   my @wait_array;
+   my %rows_for = (
+      row_operations     => \@row_operations,
+      row_operation_misc => \@row_operation_misc,
+      semaphores         => \@semaphores,
+      wait_array         => \@wait_array,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+   my $incvar  = $config{status_inc}->{val};
+
+   foreach my $cxn ( @cxns ) {
+      my $set = $vars{$cxn}->{$clock};
+      my $pre = $vars{$cxn}->{$clock-1} || $set;
+      my $inc; # Only assigned to if wanted
+
+      if ( $set->{IB_ro_complete} ) {
+         if ( $wanted{row_operations} ) {
+            $inc ||= $incvar ? inc(0, $cxn) : $set;
+            push @row_operations, extract_values($inc, $set, $pre, 'row_operations');
+         }
+         if ( $wanted{row_operation_misc} ) {
+            push @row_operation_misc, extract_values($set, $set, $pre, 'row_operation_misc'),
+         }
+      }
+
+      if ( $set->{IB_sm_complete} && $wanted{semaphores} ) {
+         $inc ||= $incvar ? inc(0, $cxn) : $set;
+         push @semaphores, extract_values($inc, $set, $pre, 'semaphores');
+      }
+
+      if ( $set->{IB_sm_wait_array_size} && $wanted{wait_array} ) {
+         foreach my $wait ( @{$set->{IB_sm_waits}} ) {
+            my $hash = extract_values($wait, $wait, $wait, 'wait_array');
+            $hash->{cxn} = $cxn;
+            push @wait_array, $hash;
+         }
+      }
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   draw_screen(\@display_lines);
+}
+
+# display_T {{{3
+sub display_T {
+   my @display_lines;
+
+   my @t_header;
+   my @innodb_transactions;
+   my %rows_for = (
+      t_header            => \@t_header,
+      innodb_transactions => \@innodb_transactions,
+   );
+
+   my @visible = $opts{n} ? 'innodb_transactions' : get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+
+   my @cxns = get_connections();
+
+   # If the header is to be shown, buffer pool data is required.
+   get_innodb_status( \@cxns, [ $wanted{t_header} ? qw(bp) : () ] );
+
+   foreach my $cxn ( get_connections() ) {
+      my $set = $vars{$cxn}->{$clock};
+      my $pre = $vars{$cxn}->{$clock-1} || $set;
+
+      next unless $set->{IB_tx_transactions};
+
+      if ( $wanted{t_header} ) {
+         my $hash = extract_values($set, $set, $pre, 't_header');
+         push @t_header, $hash;
+      }
+
+      if ( $wanted{innodb_transactions} ) {
+         my $cur_txns = $set->{IB_tx_transactions};
+         my $pre_txns = $pre->{IB_tx_transactions} || $cur_txns;
+         my %cur_txns = map { $_->{mysql_thread_id} => $_ } @$cur_txns;
+         my %pre_txns = map { $_->{mysql_thread_id} => $_ } @$pre_txns;
+         foreach my $thd_id ( sort keys %cur_txns ) {
+            my $cur_txn = $cur_txns{$thd_id};
+            my $pre_txn = $pre_txns{$thd_id} || $cur_txn;
+            my $hash    = extract_values($cur_txn, $cur_txn, $pre_txn, 'innodb_transactions');
+            $hash->{cxn} = $cxn;
+            push @innodb_transactions, $hash;
+         }
+      }
+
+   }
+
+   my $first_table = 0;
+   foreach my $tbl ( @visible ) {
+      push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+      push @display_lines, get_cxn_errors(@cxns)
+         if ( $config{debug}->{val} || !$first_table++ );
+   }
+
+   # Save queries in global variable for analysis.  The rows in %rows_for have been
+   # filtered, etc as a side effect of set_to_tbl(), so they are the same as the rows
+   # that get pushed to the screen.
+   @current_queries = map {
+      my %hash;
+      @hash{ qw(cxn id db query secs) } = @{$_}{ qw(cxn mysql_thread_id db query_text active_secs) };
+      \%hash;
+   } @{$rows_for{innodb_transactions}};
+
+   draw_screen(\@display_lines);
+}
+
+# display_S {{{3
+sub display_S {
+   my $fmt  = get_var_set('S_set');
+   my $func = $config{S_func}->{val};
+   my $inc  = $func eq 'g' || $config{status_inc}->{val};
+
+   # The table's meta-data is generated from the compiled var_set.
+   my ( $cols, $visible );
+   if ( $tbl_meta{var_status}->{fmt} && $fmt eq $tbl_meta{var_status}->{fmt} ) {
+      ( $cols, $visible ) = @{$tbl_meta{var_status}}{qw(cols visible)};
+   }
+   else {
+      ( $cols, $visible ) = compile_select_stmt($fmt);
+
+      # Apply missing values to columns.  Always apply averages across all connections.
+      map {
+         $_->{agg}   = 'avg';
+         $_->{label} = $_->{hdr};
+      } values %$cols;
+
+      $tbl_meta{var_status}->{cols}    = $cols;
+      $tbl_meta{var_status}->{visible} = $visible;
+      $tbl_meta{var_status}->{fmt}     = $fmt;
+      map { $tbl_meta{var_status}->{cols}->{$_}->{just} = ''} @$visible;
+   }
+
+   my @var_status;
+   my %rows_for = (
+      var_status => \@var_status,
+   );
+
+   my @visible = get_visible_tables();
+   my %wanted  = map { $_ => 1 } @visible;
+   my @cxns    = get_connections();
+
+   get_status_info(@cxns);
+   get_innodb_status(\@cxns);
+
+   # Set up whether to pivot and how many sets to extract.
+   $tbl_meta{var_status}->{pivot} = $func eq 'v';
+
+   my $num_sets
+      = $func eq 'v'
+      ? $config{num_status_sets}->{val}
+      : 0;
+   foreach my $set ( 0 .. $num_sets ) {
+      my @rows;
+      foreach my $cxn ( @cxns ) {
+         my $vars = $inc ? inc($set, $cxn) : $vars{$cxn}->{$clock - $set};
+         my $cur  = $vars{$cxn}->{$clock-$set};
+         my $pre  = $vars{$cxn}->{$clock-$set-1} || $cur;
+         next unless $vars && %$vars;
+         my $hash = extract_values($vars, $cur, $pre, 'var_status');
+         push @rows, $hash;
+      }
+      @rows = apply_group_by('var_status', [], @rows);
+      push @var_status, @rows;
+   }
+
+   # Recompile the sort func. TODO: avoid recompiling at every refresh.
+   # Figure out whether the data is all numeric and decide on a sort type.
+   # my $cmp
+   #   = scalar(
+   #      grep { !defined $_ || $_ !~ m/^\d+$/ }
+   #      map  { my $col = $_; map { $_->{$col} } @var_status }
+   #           $tbl_meta{var_status}->{sort_cols} =~ m/(\w+)/g)
+   #   ? 'cmp'
+   #   : '<=>';
+   $tbl_meta{var_status}->{sort_func} = make_sort_func($tbl_meta{var_status});
+
+   # ################################################################
+   # Now there is specific display code based on $config{S_func}
+   # ################################################################
+   if ( $func =~ m/s|g/ ) {
+      my $min_width = 4;
+
+      # Clear the screen if the display width changed.
+      if ( @last_term_size && $this_term_size[0] != $last_term_size[0] ) {
+         $lines_printed = 0;
+         $clear_screen_sub->();
+      }
+
+      if ( $func eq 's' ) {
+         # Decide how wide columns should be.
+         my $num_cols = scalar(@$visible);
+         my $width    = $opts{n} ? 0 : max($min_width, int(($this_term_size[0] - $num_cols + 1) / $num_cols));
+         my $g_format = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols );
+
+         # Print headers every now and then.  Headers can get really long, so compact them.
+         my @hdr = @$visible;
+         if ( $opts{n} ) {
+            if ( $lines_printed == 0 ) {
+               print join("\t", @hdr), "\n";
+               $lines_printed++;
+            }
+         }
+         elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) {
+            @hdr = map { donut(crunch($_, $width), $width) } @hdr;
+            print join(' ', map { sprintf( "%${width}s", donut($_, $width)) } @hdr) . "\n";
+            $lines_printed = 1;
+         }
+
+         # Design a column format for the values.
+         my $format
+            = $opts{n}
+            ? join("\t", map { '%s' } @$visible) . "\n"
+            : join(' ',  map { "%${width}s" } @hdr) . "\n";
+
+         foreach my $row ( @var_status ) {
+            printf($format, map { defined $_ ? $_ : '' } @{$row}{ @$visible });
+            $lines_printed++;
+         }
+      }
+      else { # 'g' mode
+         # Design a column format for the values.
+         my $num_cols = scalar(@$visible);
+         my $width    = $opts{n} ? 0 : int(($this_term_size[0] - $num_cols + 1) / $num_cols);
+         my $format   = $opts{n} ? ( "%s\t" x $num_cols ) : ( "%-${width}s " x $num_cols );
+         $format      =~ s/\s$/\n/;
+
+         # Print headers every now and then.
+         if ( $opts{n} ) {
+            if ( $lines_printed == 0 ) {
+               print join("\t", @$visible), "\n";
+               print join("\t", map { shorten($mvs{$_}) } @$visible), "\n";
+            }
+         }
+         elsif ( $lines_printed == 0 || $lines_printed > $this_term_size[1] - 2 ) {
+            printf($format, map { donut(crunch($_, $width), $width) } @$visible);
+            printf($format, map { shorten($mvs{$_} || 0) } @$visible);
+            $lines_printed = 2;
+         }
+
+         # Update the max ever seen, and scale by the max ever seen.
+         my $set = $var_status[0];
+         foreach my $col ( @$visible ) {
+            $set->{$col}  = 1 unless defined $set->{$col} && $set->{$col} =~ m/$num_regex/;
+            $set->{$col}  = ($set->{$col} || 1) / ($set->{Uptime_hires} || 1);
+            $mvs{$col}    = max($mvs{$col} || 1, $set->{$col});
+            $set->{$col} /= $mvs{$col};
+         }
+         printf($format, map { ( $config{graph_char}->{val} x int( $width * $set->{$_} )) || '.' } @$visible );
+         $lines_printed++;
+
+      }
+   }
+   else { # 'v'
+      my $first_table = 0;
+      my @display_lines;
+      foreach my $tbl ( @visible ) {
+         push @display_lines, '', set_to_tbl($rows_for{$tbl}, $tbl);
+         push @display_lines, get_cxn_errors(@cxns)
+            if ( $config{debug}->{val} || !$first_table++ );
+      }
+      $clear_screen_sub->();
+      draw_screen( \@display_lines );
+   }
+}
+
+# display_explain {{{3
+sub display_explain {
+   my $info = shift;
+   my $cxn   = $info->{cxn};
+   my $db    = $info->{db};
+
+   my ( $mods, $query ) = rewrite_for_explain($info->{query});
+
+   my @display_lines;
+
+   if ( $query ) {
+
+      my $part = version_ge($dbhs{$cxn}->{dbh}, '5.1.5') ? 'PARTITIONS' : '';
+      $query = "EXPLAIN $part\n" . $query;
+
+      eval {
+         if ( $db ) {
+            do_query($cxn, "use $db");
+         }
+         my $sth = do_query($cxn, $query);
+
+         my $res;
+         while ( $res = $sth->fetchrow_hashref() ) {
+            map { $res->{$_} ||= '' } ( 'partitions', keys %$res);
+            my @this_table = create_caption("Sub-Part $res->{id}",
+               create_table2(
+                  $tbl_meta{explain}->{visible},
+                  meta_to_hdr('explain'),
+                  extract_values($res, $res, $res, 'explain')));
+            @display_lines = stack_next(\@display_lines, \@this_table, { pad => '  ', vsep => 2 });
+         }
+      };
+
+      if ( $EVAL_ERROR ) {
+         push @display_lines,
+            '',
+            "The query could not be explained.  Only SELECT queries can be "
+            . "explained; innotop tries to rewrite certain REPLACE and INSERT queries "
+            . "into SELECT, but this doesn't always succeed.";
+      }
+
+   }
+   else {
+      push @display_lines, '', 'The query could not be explained.';
+   }
+
+   if ( $mods ) {
+      push @display_lines, '', '[This query has been re-written to be explainable]';
+   }
+
+   unshift @display_lines, no_ctrl_char($query);
+   draw_screen(\@display_lines, { raw => 1 } );
+}
+
+# rewrite_for_explain {{{3
+sub rewrite_for_explain {
+   my $query = shift;
+
+   my $mods = 0;
+   my $orig = $query;
+   $mods += $query =~ s/^\s*(?:replace|insert).*?select/select/is;
+   $mods += $query =~ s/^
+      \s*create\s+(?:temporary\s+)?table
+      \s+(?:\S+\s+)as\s+select/select/xis;
+   $mods += $query =~ s/\s+on\s+duplicate\s+key\s+update.*$//is;
+   return ( $mods, $query );
+}
+
+# show_optimized_query {{{3
+sub show_optimized_query {
+   my $info = shift;
+   my $cxn   = $info->{cxn};
+   my $db    = $info->{db};
+   my $meta  = $dbhs{$cxn};
+
+   my @display_lines;
+
+   my ( $mods, $query ) = rewrite_for_explain($info->{query});
+
+   if ( $mods ) {
+      push @display_lines, '[This query has been re-written to be explainable]';
+   }
+
+   if ( $query ) {
+      push @display_lines, no_ctrl_char($info->{query});
+
+      eval {
+         if ( $db ) {
+            do_query($cxn, "use $db");
+         }
+         do_query( $cxn, 'EXPLAIN EXTENDED ' . $query ) or die "Can't explain query";
+         my $sth = do_query($cxn, 'SHOW WARNINGS');
+         my $res = $sth->fetchall_arrayref({});
+
+         if ( $res ) {
+            foreach my $result ( @$res ) {
+               push @display_lines, 'Note:', no_ctrl_char($result->{message});
+            }
+         }
+         else {
+            push @display_lines, '', 'The query optimization could not be generated.';
+         }
+      };
+
+      if ( $EVAL_ERROR ) {
+         push @display_lines, '', "The optimization could not be generated: $EVAL_ERROR";
+      }
+
+   }
+   else {
+      push @display_lines, '', 'The query optimization could not be generated.';
+   }
+
+   draw_screen(\@display_lines, { raw => 1 } );
+}
+
+# display_help {{{3
+sub display_help {
+   my $mode = $config{mode}->{val};
+
+   # Get globally mapped keys, then overwrite them with mode-specific ones.
+   my %keys = map {
+         $_ => $action_for{$_}->{label}
+      } keys %action_for;
+   foreach my $key ( keys %{$modes{$mode}->{action_for}} ) {
+      $keys{$key} = $modes{$mode}->{action_for}->{$key}->{label};
+   }
+   delete $keys{'?'};
+
+   # Split them into three kinds of keys: MODE keys, action keys, and
+   # magic (special character) keys.
+   my @modes   = sort grep { m/[A-Z]/   } keys %keys;
+   my @actions = sort grep { m/[a-z]/   } keys %keys;
+   my @magic   = sort grep { m/[^A-Z]/i } keys %keys;
+
+   my @display_lines = ( '', 'Switch to a different mode:' );
+
+   # Mode keys
+   my @all_modes = map { "$_  $modes{$_}->{hdr}" } @modes;
+   my @col1 = splice(@all_modes, 0, ceil(@all_modes/3));
+   my @col2 = splice(@all_modes, 0, ceil(@all_modes/2));
+   my $max1 = max(map {length($_)} @col1);
+   my $max2 = max(map {length($_)} @col2);
+   while ( @col1 ) {
+      push @display_lines, sprintf("   %-${max1}s  %-${max2}s  %s",
+         (shift @col1      || ''),
+         (shift @col2      || ''),
+         (shift @all_modes || ''));
+   }
+
+   # Action keys
+   my @all_actions = map { "$_  $keys{$_}" } @actions;
+   @col1 = splice(@all_actions, 0, ceil(@all_actions/2));
+   $max1 = max(map {length($_)} @col1);
+   push @display_lines, '', 'Actions:';
+   while ( @col1 ) {
+      push @display_lines, sprintf("   %-${max1}s  %s",
+         (shift @col1        || ''),
+         (shift @all_actions || ''));
+   }
+
+   # Magic keys
+   my @all_magic = map { sprintf('%4s', $action_for{$_}->{key} || $_) . "  $keys{$_}" } @magic;
+   @col1 = splice(@all_magic, 0, ceil(@all_magic/2));
+   $max1 = max(map {length($_)} @col1);
+   push @display_lines, '', 'Other:';
+   while ( @col1 ) {
+      push @display_lines, sprintf("%-${max1}s%s",
+         (shift @col1      || ''),
+         (shift @all_magic || ''));
+   }
+
+   $clear_screen_sub->();
+   draw_screen(\@display_lines, { show_all => 1 } );
+   pause();
+   $clear_screen_sub->();
+}
+
+# show_full_query {{{3
+sub show_full_query {
+   my $info = shift;
+   my @display_lines = no_ctrl_char($info->{query});
+   draw_screen(\@display_lines, { raw => 1 });
+}
+
+# Formatting functions {{{2
+
+# create_table2 {{{3
+# Makes a two-column table, labels on left, data on right.
+# Takes refs of @cols, %labels and %data, %user_prefs
+sub create_table2 {
+   my ( $cols, $labels, $data, $user_prefs ) = @_;
+   my @rows;
+
+   if ( @$cols && %$data ) {
+
+      # Override defaults
+      my $p = {
+         just  => '',
+         sep   => ':',
+         just1 => '-',
+      };
+      if ( $user_prefs ) {
+         map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs;
+      }
+
+      # Fix undef values
+      map { $data->{$_} = '' unless defined $data->{$_} } @$cols;
+
+      # Format the table
+      my $max_l = max(map{ length($labels->{$_}) } @$cols);
+      my $max_v = max(map{ length($data->{$_}) } @$cols);
+      my $format    = "%$p->{just}${max_l}s$p->{sep} %$p->{just1}${max_v}s";
+      foreach my $col ( @$cols ) {
+         push @rows, sprintf($format, $labels->{$col}, $data->{$col});
+      }
+   }
+   return @rows;
+}
+
+# stack_next {{{3
+# Stacks one display section next to the other.  Accepts left-hand arrayref,
+# right-hand arrayref, and options hashref.  Tries to stack as high as
+# possible, so
+# aaaaaa
+# bbb
+# can stack ccc next to the bbb.
+# NOTE: this DOES modify its arguments, even though it returns a new array.
+sub stack_next {
+   my ( $left, $right, $user_prefs ) = @_;
+   my @result;
+
+   my $p = {
+      pad   => ' ',
+      vsep  => 0,
+   };
+   if ( $user_prefs ) {
+      map { $p->{$_} = $user_prefs->{$_} } keys %$user_prefs;
+   }
+
+   # Find out how wide the LHS can be and still let the RHS fit next to it.
+   my $pad   = $p->{pad};
+   my $max_r = max( map { length($_) } @$right) || 0;
+   my $max_l = $this_term_size[0] - $max_r - length($pad);
+
+   # Find the minimum row on the LHS that the RHS will fit next to.
+   my $i = scalar(@$left) - 1;
+   while ( $i >= 0 && length($left->[$i]) <= $max_l ) {
+      $i--;
+   }
+   $i++;
+   my $offset = $i;
+
+   if ( $i < scalar(@$left) ) {
+      # Find the max width of the section of the LHS against which the RHS
+      # will sit.
+      my $max_i_in_common = min($i + scalar(@$right) - 1, scalar(@$left) - 1);
+      my $max_width = max( map { length($_) } @{$left}[$i..$max_i_in_common]);
+
+      # Append the RHS onto the LHS until one runs out.
+      while ( $i < @$left && $i - $offset < @$right ) {
+         my $format = "%-${max_width}s$pad%${max_r}s";
+         $left->[$i] = sprintf($format, $left->[$i], $right->[$i - $offset]);
+         $i++;
+      }
+      while ( $i - $offset < @$right ) {
+         # There is more RHS to push on the end of the array
+         push @$left,
+            sprintf("%${max_width}s$pad%${max_r}s", ' ', $right->[$i - $offset]);
+         $i++;
+      }
+      push @result, @$left;
+   }
+   else {
+      # There is no room to put them side by side.  Add them below, with
+      # a blank line above them if specified.
+      push @result, @$left;
+      push @result, (' ' x $this_term_size[0]) if $p->{vsep} && @$left;
+      push @result, @$right;
+   }
+   return @result;
+}
+
+# create_caption {{{3
+sub create_caption {
+   my ( $caption, @rows ) = @_;
+   if ( @rows ) {
+
+      # Calculate the width of what will be displayed, so it can be centered
+      # in that space.  When the thing is wider than the display, center the
+      # caption in the display.
+      my $width = min($this_term_size[0], max(map { length(ref($_) ? $_->[0] : $_) } @rows));
+
+      my $cap_len = length($caption);
+
+      # It may be narrow enough to pad the sides with underscores and save a
+      # line on the screen.
+      if ( $cap_len <= $width - 6 ) {
+         my $left = int(($width - 2 - $cap_len) / 2);
+         unshift @rows,
+            ("_" x $left) . " $caption " . ("_" x ($width - $left - $cap_len - 2));
+      }
+
+      # The caption is too wide to add underscores on each side.
+      else {
+
+         # Color is supported, so we can use terminal underlining.
+         if ( $config{color}->{val} ) {
+            my $left = int(($width - $cap_len) / 2);
+            unshift @rows, [
+               (" " x $left) . $caption . (" " x ($width - $left - $cap_len)),
+               'underline',
+            ];
+         }
+
+         # Color is not supported, so we have to add a line underneath to separate the
+         # caption from whatever it's captioning.
+         else {
+            my $left = int(($width - $cap_len) / 2);
+            unshift @rows, ('-' x $width);
+            unshift @rows, (" " x $left) . $caption . (" " x ($width - $left - $cap_len));
+         }
+
+         # The caption is wider than the thing it labels, so we have to pad the
+         # thing it labels to a consistent width.
+         if ( $cap_len > $width ) {
+            @rows = map {
+               ref($_)
+                  ? [ sprintf('%-' . $cap_len . 's', $_->[0]), $_->[1] ]
+                  : sprintf('%-' . $cap_len . 's', $_);
+            } @rows;
+         }
+
+      }
+   }
+   return @rows;
+}
+
+# create_table {{{3
+# Input: an arrayref of columns, hashref of col info, and an arrayref of hashes
+# Example: [ 'a', 'b' ]
+#          { a => spec, b => spec }
+#          [ { a => 1, b => 2}, { a => 3, b => 4 } ]
+# The 'spec' is a hashref of hdr => label, just => ('-' or '').  It also supports min and max-widths
+# vi the minw and maxw params.
+# Output: an array of strings, one per row.
+# Example:
+# Column One Column Two
+# ---------- ----------
+# 1          2
+# 3          4
+sub create_table {
+   my ( $cols, $info, $data, $prefs ) = @_;
+   $prefs ||= {};
+   $prefs->{no_hdr} ||= ($opts{n} && $clock != 1);
+
+   # Truncate rows that will surely be off screen even if this is the only table.
+   if ( !$opts{n} && !$prefs->{raw} && !$prefs->{show_all} && $this_term_size[1] < @$data-1 ) {
+      $data = [ @$data[0..$this_term_size[1] - 1] ];
+   }
+
+   my @rows = ();
+
+   if ( @$cols && %$info ) {
+
+      # Fix undef values, collapse whitespace.
+      foreach my $row ( @$data ) {
+         map { $row->{$_} = collapse_ws($row->{$_}) } @$cols;
+      }
+
+      my $col_sep = $opts{n} ? "\t" : '  ';
+
+      # Find each column's max width.
+      my %width_for;
+      if ( !$opts{n} ) {
+         %width_for = map {
+            my $col_name  = $_;
+            if ( $info->{$_}->{dec} ) {
+               # Align along the decimal point
+               my $max_rodp = max(0, map { $_->{$col_name} =~ m/([^\s\d-].*)$/ ? length($1) : 0 } @$data);
+               foreach my $row ( @$data ) {
+                  my $col = $row->{$col_name};
+                  my ( $l, $r ) = $col =~ m/^([\s\d]*)(.*)$/;
+                  $row->{$col_name} = sprintf("%s%-${max_rodp}s", $l, $r);
+               }
+            }
+            my $max_width = max( length($info->{$_}->{hdr}), map { length($_->{$col_name}) } @$data);
+            if ( $info->{$col_name}->{maxw} ) {
+               $max_width = min( $max_width, $info->{$col_name}->{maxw} );
+            }
+            if ( $info->{$col_name}->{minw} ) {
+               $max_width = max( $max_width, $info->{$col_name}->{minw} );
+            }
+            $col_name => $max_width;
+         } @$cols;
+      }
+
+      # The table header.
+      if ( !$config{hide_hdr}->{val} && !$prefs->{no_hdr} ) {
+         push @rows, $opts{n}
+            ? join( $col_sep, @$cols )
+            : join( $col_sep, map { sprintf( "%-$width_for{$_}s", trunc($info->{$_}->{hdr}, $width_for{$_}) ) } @$cols );
+         if ( $config{color}->{val} && $config{header_highlight}->{val} ) {
+            push @rows, [ pop @rows, $config{header_highlight}->{val} ];
+         }
+         elsif ( !$opts{n} ) {
+            push @rows, join( $col_sep, map { "-" x $width_for{$_} } @$cols );
+         }
+      }
+
+      # The table data.
+      if ( $opts{n} ) {
+         foreach my $item ( @$data ) {
+            push @rows, join($col_sep, map { $item->{$_} } @$cols );
+         }
+      }
+      else {
+         my $format = join( $col_sep,
+            map { "%$info->{$_}->{just}$width_for{$_}s" } @$cols );
+         foreach my $item ( @$data ) {
+            my $row = sprintf($format, map { trunc($item->{$_}, $width_for{$_}) } @$cols );
+            if ( $config{color}->{val} && $item->{_color} ) {
+               push @rows, [ $row, $item->{_color} ];
+            }
+            else {
+               push @rows, $row;
+            }
+         }
+      }
+   }
+
+   return @rows;
+}
+
+# Aggregates a table.  If $group_by is an arrayref of columns, the grouping key
+# is the specified columns; otherwise it's just the empty string (e.g.
+# everything is grouped as one group).
+sub apply_group_by {
+   my ( $tbl, $group_by, @rows ) = @_;
+   my $meta = $tbl_meta{$tbl};
+   my %is_group = map { $_ => 1 } @$group_by;
+   my @non_grp  = grep { !$is_group{$_} } keys %{$meta->{cols}};
+
+   my %temp_table;
+   foreach my $row ( @rows ) {
+      my $group_key
+         = @$group_by
+         ? '{' . join('}{', map { defined $_ ? $_ : '' } @{$row}{@$group_by}) . '}'
+         : '';
+      $temp_table{$group_key} ||= [];
+      push @{$temp_table{$group_key}}, $row;
+   }
+
+   # Crush the rows together...
+   my @new_rows;
+   foreach my $key ( sort keys %temp_table ) {
+      my $group = $temp_table{$key};
+      my %new_row;
+      @new_row{@$group_by} = @{$group->[0]}{@$group_by};
+      foreach my $col ( @non_grp ) {
+         my $agg = $meta->{cols}->{$col}->{agg} || 'first';
+         $new_row{$col} = $agg_funcs{$agg}->( map { $_->{$col} } @$group );
+      }
+      push @new_rows, \%new_row;
+   }
+   return @new_rows;
+}
+
+# set_to_tbl {{{3
+# Unifies all the work of filtering, sorting etc.  Alters the input.
+# TODO: pull all the little pieces out into subroutines and stick events in each of them.
+sub set_to_tbl {
+   my ( $rows, $tbl ) = @_;
+   my $meta = $tbl_meta{$tbl} or die "No such table $tbl in tbl_meta";
+
+   if ( !$meta->{pivot} ) {
+
+      # Hook in event listeners
+      foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) {
+         $listener->set_to_tbl_pre_filter($rows, $tbl);
+      }
+
+      # Apply filters.  Note that if the table is pivoted, filtering and sorting
+      # are applied later.
+      foreach my $filter ( @{$meta->{filters}} ) {
+         eval {
+            @$rows = grep { $filters{$filter}->{func}->($_) } @$rows;
+         };
+         if ( $EVAL_ERROR && $config{debug}->{val} ) {
+            die $EVAL_ERROR;
+         }
+      }
+
+      foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) {
+         $listener->set_to_tbl_pre_sort($rows, $tbl);
+      }
+
+      # Sort.  Note that if the table is pivoted, sorting might have the wrong
+      # columns and it could crash.  This will only be an issue if it's possible
+      # to toggle pivoting on and off, which it's not at the moment.
+      if ( @$rows && $meta->{sort_func} && !$meta->{aggregate} ) {
+         if ( $meta->{sort_dir} > 0 ) {
+            @$rows = $meta->{sort_func}->( @$rows );
+         }
+         else {
+            @$rows = reverse $meta->{sort_func}->( @$rows );
+         }
+      }
+
+   }
+
+   # Stop altering arguments now.
+   my @rows = @$rows;
+
+   foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_group}} ) {
+      $listener->set_to_tbl_pre_group(\@rows, $tbl);
+   }
+
+   # Apply group-by.
+   if ( $meta->{aggregate} ) {
+      @rows = apply_group_by($tbl, $meta->{group_by}, @rows);
+
+      # Sort.  Note that if the table is pivoted, sorting might have the wrong
+      # columns and it could crash.  This will only be an issue if it's possible
+      # to toggle pivoting on and off, which it's not at the moment.
+      if ( @rows && $meta->{sort_func} ) {
+         if ( $meta->{sort_dir} > 0 ) {
+            @rows = $meta->{sort_func}->( @rows );
+         }
+         else {
+            @rows = reverse $meta->{sort_func}->( @rows );
+         }
+      }
+
+   }
+
+   foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_colorize}} ) {
+      $listener->set_to_tbl_pre_colorize(\@rows, $tbl);
+   }
+
+   if ( !$meta->{pivot} ) {
+      # Colorize.  Adds a _color column to rows.
+      if ( @rows && $meta->{color_func} ) {
+         eval {
+            foreach my $row ( @rows ) {
+               $row->{_color} = $meta->{color_func}->($row);
+            }
+         };
+         if ( $EVAL_ERROR ) {
+            pause($EVAL_ERROR);
+         }
+      }
+   }
+
+   foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_transform}} ) {
+      $listener->set_to_tbl_pre_transform(\@rows, $tbl);
+   }
+
+   # Apply_transformations.
+   if ( @rows ) {
+      my $cols = $meta->{cols};
+      foreach my $col ( keys %{$rows->[0]} ) {
+         # Don't auto-vivify $tbl_meta{tbl}-{cols}->{_color}->{trans}
+         next if $col eq '_color';
+         foreach my $trans ( @{$cols->{$col}->{trans}} ) {
+            map { $_->{$col} = $trans_funcs{$trans}->($_->{$col}) } @rows;
+         }
+      }
+   }
+
+   my ($fmt_cols, $fmt_meta);
+
+   # Pivot.
+   if ( $meta->{pivot} ) {
+
+      foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_pivot}} ) {
+         $listener->set_to_tbl_pre_pivot(\@rows, $tbl);
+      }
+
+      my @vars = @{$meta->{visible}};
+      my @tmp  = map { { name => $_ } } @vars;
+      my @cols = 'name';
+      foreach my $i ( 0..@$rows-1 ) {
+         my $col = "set_$i";
+         push @cols, $col;
+         foreach my $j ( 0.. at vars-1 ) {
+            $tmp[$j]->{$col} = $rows[$i]->{$vars[$j]};
+         }
+      }
+      $fmt_meta = { map { $_ => { hdr => $_, just => '-' } } @cols };
+      $fmt_cols = \@cols;
+      @rows = @tmp;
+
+      # Hook in event listeners
+      foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_filter}} ) {
+         $listener->set_to_tbl_pre_filter($rows, $tbl);
+      }
+
+      # Apply filters.
+      foreach my $filter ( @{$meta->{filters}} ) {
+         eval {
+            @rows = grep { $filters{$filter}->{func}->($_) } @rows;
+         };
+         if ( $EVAL_ERROR && $config{debug}->{val} ) {
+            die $EVAL_ERROR;
+         }
+      }
+
+      foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_sort}} ) {
+         $listener->set_to_tbl_pre_sort($rows, $tbl);
+      }
+
+      # Sort.
+      if ( @rows && $meta->{sort_func} ) {
+         if ( $meta->{sort_dir} > 0 ) {
+            @rows = $meta->{sort_func}->( @rows );
+         }
+         else {
+            @rows = reverse $meta->{sort_func}->( @rows );
+         }
+      }
+
+   }
+   else {
+      # If the table isn't pivoted, just show all columns that are supposed to
+      # be shown; but eliminate aggonly columns if the table isn't aggregated.
+      my $aggregated = $meta->{aggregate};
+      $fmt_cols = [ grep { $aggregated || !$meta->{cols}->{$_}->{aggonly} } @{$meta->{visible}} ];
+      $fmt_meta = { map  { $_ => $meta->{cols}->{$_}                      } @$fmt_cols };
+
+      # If the table is aggregated, re-order the group_by columns to the left of
+      # the display.
+      if ( $aggregated ) {
+         my %is_group = map { $_ => 1 } @{$meta->{group_by}};
+         $fmt_cols = [ @{$meta->{group_by}}, grep { !$is_group{$_} } @$fmt_cols ];
+      }
+   }
+
+   foreach my $listener ( @{$event_listener_for{set_to_tbl_pre_create}} ) {
+      $listener->set_to_tbl_pre_create(\@rows, $tbl);
+   }
+
+   @rows = create_table( $fmt_cols, $fmt_meta, \@rows);
+   if ( !$meta->{hide_caption} && !$opts{n} && $config{display_table_captions}->{val} ) {
+      @rows = create_caption($meta->{capt}, @rows)
+   }
+
+   foreach my $listener ( @{$event_listener_for{set_to_tbl_post_create}} ) {
+      $listener->set_to_tbl_post_create(\@rows, $tbl);
+   }
+
+   return @rows;
+}
+
+# meta_to_hdr {{{3
+sub meta_to_hdr {
+   my $tbl = shift;
+   my $meta = $tbl_meta{$tbl};
+   my %labels = map { $_ => $meta->{cols}->{$_}->{hdr} } @{$meta->{visible}};
+   return \%labels;
+}
+
+# commify {{{3
+# From perlfaq5: add commas.
+sub commify {
+   my ( $num ) = @_;
+   $num = 0 unless defined $num;
+   $num =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g;
+   return $num;
+}
+
+# set_precision {{{3
+# Trim to desired precision.
+sub set_precision {
+   my ( $num, $precision ) = @_;
+   $precision = $config{num_digits}->{val} if !defined $precision;
+   sprintf("%.${precision}f", $num);
+}
+
+# percent {{{3
+# Convert to percent
+sub percent {
+   my ( $num ) = @_;
+   $num = 0 unless defined $num;
+   my $digits = $config{num_digits}->{val};
+   return sprintf("%.${digits}f", $num * 100)
+      . ($config{show_percent}->{val} ? '%' : '');
+}
+
+# shorten {{{3
+sub shorten {
+   my ( $num, $opts ) = @_;
+
+   return $num if !defined($num) || $opts{n} || $num !~ m/$num_regex/;
+
+   $opts ||= {};
+   my $pad = defined $opts->{pad} ? $opts->{pad} : '';
+   my $num_digits = defined $opts->{num_digits}
+      ? $opts->{num_digits}
+      : $config{num_digits}->{val};
+   my $force = defined $opts->{force};
+
+   my $n = 0;
+   while ( $num >= 1_024 ) {
+      $num /= 1_024;
+      ++$n;
+   }
+   return sprintf(
+      $num =~ m/\./ || $n || $force
+         ? "%.${num_digits}f%s"
+         : '%d',
+      $num, ($pad,'k','M','G', 'T')[$n]);
+
+}
+
+# Utility functions {{{2
+# unique {{{3
+sub unique {
+   my %seen;
+   return grep { !$seen{$_}++ } @_;
+}
+
+# make_color_func {{{3
+sub make_color_func {
+   my ( $tbl ) = @_;
+   my @criteria;
+   foreach my $spec ( @{$tbl->{colors}} ) {
+      next unless exists $comp_ops{$spec->{op}};
+      my $val = $spec->{op} =~ m/^(?:eq|ne|le|ge|lt|gt)$/ ? "'$spec->{arg}'"
+              : $spec->{op} =~ m/^(?:=~|!~)$/             ? "m/" . quotemeta($spec->{arg}) . "/"
+              :                                             $spec->{arg};
+      push @criteria,
+         "( defined \$set->{$spec->{col}} && \$set->{$spec->{col}} $spec->{op} $val ) { return '$spec->{color}'; }";
+   }
+   return undef unless @criteria;
+   my $sub = eval 'sub { my ( $set ) = @_; if ' . join(" elsif ", @criteria) . '}';
+   die if $EVAL_ERROR;
+   return $sub;
+}
+
+# make_sort_func {{{3
+# Gets a list of sort columns from the table, like "+cxn -time" and returns a
+# subroutine that will sort that way.
+sub make_sort_func {
+   my ( $tbl ) = @_;
+   my @criteria;
+
+   # Pivoted tables can be sorted by 'name' and set_x columns; others must be
+   # sorted by existing columns.  TODO: this will crash if you toggle between
+   # pivoted and nonpivoted.  I have several other 'crash' notes about this if
+   # this ever becomes possible.
+
+   if ( $tbl->{pivot} ) {
+      # Sort type is not really possible on pivoted columns, because a 'column'
+      # contains data from an entire non-pivoted row, so there could be a mix of
+      # numeric and non-numeric data.  Thus everything has to be 'cmp' type.
+      foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) {
+         next unless $col;
+         my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/;
+         next unless $name && $name =~ m/^(?:name|set_\d+)$/;
+         $dir ||= '+';
+         my $op = 'cmp';
+         my $df = "''";
+         push @criteria,
+            $dir eq '+'
+            ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)"
+            : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)";
+      }
+   }
+   else {
+      foreach my $col ( split(/\s+/, $tbl->{sort_cols} ) ) {
+         next unless $col;
+         my ( $dir, $name ) = $col =~ m/([+-])?(\w+)$/;
+         next unless $name && $tbl->{cols}->{$name};
+         $dir ||= '+';
+         my $op = $tbl->{cols}->{$name}->{num} ? "<=>" : "cmp";
+         my $df = $tbl->{cols}->{$name}->{num} ? "0"   : "''";
+         push @criteria,
+            $dir eq '+'
+            ? "(\$a->{$name} || $df) $op (\$b->{$name} || $df)"
+            : "(\$b->{$name} || $df) $op (\$a->{$name} || $df)";
+      }
+   }
+   return sub { return @_ } unless @criteria;
+   my $sub = eval 'sub { sort {' . join("||", @criteria) . '} @_; }';
+   die if $EVAL_ERROR;
+   return $sub;
+}
+
+# trunc {{{3
+# Shortens text to specified length.
+sub trunc {
+   my ( $text, $len ) = @_;
+   if ( length($text) <= $len ) {
+      return $text;
+   }
+   return substr($text, 0, $len);
+}
+
+# donut {{{3
+# Takes out the middle of text to shorten it.
+sub donut {
+   my ( $text, $len ) = @_;
+   return $text if length($text) <= $len;
+   my $max = length($text) - $len;
+   my $min = $max - 1;
+
+   # Try to remove a single "word" from somewhere in the center
+   if ( $text =~ s/_[^_]{$min,$max}_/_/ ) {
+      return $text;
+   }
+
+   # Prefer removing the end of a "word"
+   if ( $text =~ s/([^_]+)[^_]{$max}_/$1_/ ) {
+      return $text;
+   }
+
+   $text = substr($text, 0, int($len/2))
+         . "_"
+         . substr($text, int($len/2) + $max + 1);
+   return $text;
+}
+
+# crunch {{{3
+# Removes vowels and compacts repeated letters to shorten text.
+sub crunch {
+   my ( $text, $len ) = @_;
+   return $text if $len && length($text) <= $len;
+   $text =~ s/^IB_\w\w_//;
+   $text =~ s/(?<![_ ])[aeiou]//g;
+   $text =~ s/(.)\1+/$1/g;
+   return $text;
+}
+
+# collapse_ws {{{3
+# Collapses all whitespace to a single space.
+sub collapse_ws {
+   my ( $text ) = @_;
+   return '' unless defined $text;
+   $text =~ s/\s+/ /g;
+   return $text;
+}
+
+# Strips out non-printable characters within fields, which freak terminals out.
+sub no_ctrl_char {
+   my ( $text ) = @_;
+   return '' unless defined $text;
+   my $charset = $config{charset}->{val};
+   if ( $charset && $charset eq 'unicode' ) {
+      $text =~ s/
+         ("(?:(?!(?<!\\)").)*"  # Double-quoted string
+         |'(?:(?!(?<!\\)').)*') # Or single-quoted string
+         /$1 =~ m#\p{IsC}# ? "[BINARY]" : $1/egx;
+   }
+   elsif ( $charset && $charset eq 'none' ) {
+      $text =~ s/
+         ("(?:(?!(?<!\\)").)*"
+         |'(?:(?!(?<!\\)').)*')
+         /[TEXT]/gx;
+   }
+   else { # The default is 'ascii'
+      $text =~ s/
+         ("(?:(?!(?<!\\)").)*"
+         |'(?:(?!(?<!\\)').)*')
+         /$1 =~ m#[^\040-\176]# ? "[BINARY]" : $1/egx;
+   }
+   return $text;
+}
+
+# word_wrap {{{3
+# Wraps text at word boundaries so it fits the screen.
+sub word_wrap {
+   my ( $text, $width) = @_;
+   $width ||= $this_term_size[0];
+   $text =~ s/(.{0,$width})(?:\s+|$)/$1\n/g;
+   $text =~ s/ +$//mg;
+   return $text;
+}
+
+# draw_screen {{{3
+# Prints lines to the screen.  The first argument is an arrayref.  Each
+# element of the array is either a string or an arrayref.  If it's a string it
+# just gets printed.  If it's an arrayref, the first element is the string to
+# print, and the second is args to colored().
+sub draw_screen {
+   my ( $display_lines, $prefs ) = @_;
+   if ( !$opts{n} && $config{show_statusbar}->{val} ) {
+      unshift @$display_lines, create_statusbar();
+   }
+
+   foreach my $listener ( @{$event_listener_for{draw_screen}} ) {
+      $listener->draw_screen($display_lines);
+   }
+
+   $clear_screen_sub->()
+      if $prefs->{clear} || !$modes{$config{mode}->{val}}->{no_clear_screen};
+   if ( $opts{n} || $prefs->{raw} ) {
+      my $num_lines = 0;
+      print join("\n",
+         map {
+            $num_lines++;
+            ref $_
+               ? colored($_->[0], $_->[1])
+               : $_;
+         }
+         grep { !$opts{n} || $_ } # Suppress empty lines
+         @$display_lines);
+      if ( $opts{n} && $num_lines ) {
+         print "\n";
+      }
+   }
+   else {
+      my $max_lines = $prefs->{show_all}
+         ? scalar(@$display_lines)- 1
+         : min(scalar(@$display_lines), $this_term_size[1]);
+      print join("\n",
+         map {
+            ref $_
+               ? colored(substr($_->[0], 0, $this_term_size[0]), $_->[1])
+               : substr($_, 0, $this_term_size[0]);
+         } @$display_lines[0..$max_lines - 1]);
+   }
+}
+
+# secs_to_time {{{3
+sub secs_to_time {
+   my ( $secs, $fmt ) = @_;
+   $secs ||= 0;
+   return '00:00' unless $secs;
+
+   # Decide what format to use, if not given
+   $fmt ||= $secs >= 86_400 ? 'd'
+          : $secs >= 3_600  ? 'h'
+          :                   'm';
+
+   return
+      $fmt eq 'd' ? sprintf(
+         "%d+%02d:%02d:%02d",
+         int($secs / 86_400),
+         int(($secs % 86_400) / 3_600),
+         int(($secs % 3_600) / 60),
+         $secs % 60)
+      : $fmt eq 'h' ? sprintf(
+         "%02d:%02d:%02d",
+         int(($secs % 86_400) / 3_600),
+         int(($secs % 3_600) / 60),
+         $secs % 60)
+      : sprintf(
+         "%02d:%02d",
+         int(($secs % 3_600) / 60),
+         $secs % 60);
+}
+
+# dulint_to_int {{{3
+# Takes a number that InnoDB formats as two ulint integers, like transaction IDs
+# and such, and turns it into a single integer
+sub dulint_to_int {
+   my $num = shift;
+   return 0 unless $num;
+   my ( $high, $low ) = $num =~ m/^(\d+) (\d+)$/;
+   return $low unless $high;
+   return $low + ( $high * $MAX_ULONG );
+}
+
+# create_statusbar {{{3
+sub create_statusbar {
+   my $mode = $config{mode}->{val};
+   my @cxns = sort { $a cmp $b } get_connections();
+
+   my $modeline        = ( $config{readonly}->{val} ? '[RO] ' : '' )
+                         . $modes{$mode}->{hdr} . " (? for help)";
+   my $mode_width      = length($modeline);
+   my $remaining_width = $this_term_size[0] - $mode_width - 1;
+   my $result;
+
+   # The thingie in top-right that says what we're monitoring.
+   my $cxn = '';
+
+   if ( 1 == @cxns && $dbhs{$cxns[0]} && $dbhs{$cxns[0]}->{dbh} ) {
+      $cxn = $dbhs{$cxns[0]}->{dbh}->{mysql_serverinfo} || '';
+   }
+   else {
+      if ( $modes{$mode}->{server_group} ) {
+         $cxn = "Servers: " . $modes{$mode}->{server_group};
+         my $err_count = grep { $dbhs{$_} && $dbhs{$_}->{err_count} } @cxns;
+         if ( $err_count ) {
+            $cxn .= "(" . ( scalar(@cxns) - $err_count ) . "/" . scalar(@cxns) . ")";
+         }
+      }
+      else {
+         $cxn = join(' ', map { ($dbhs{$_}->{err_count} ? '!' : '') . $_ }
+            grep { $dbhs{$_} } @cxns);
+      }
+   }
+
+   if ( 1 == @cxns ) {
+      get_driver_status(@cxns);
+      my $vars = $vars{$cxns[0]}->{$clock};
+      my $inc  = inc(0, $cxns[0]);
+
+      # Format server uptime human-readably, calculate QPS...
+      my $uptime = secs_to_time( $vars->{Uptime_hires} );
+      my $qps    = ($inc->{Questions}||0) / ($inc->{Uptime_hires}||1);
+      my $ibinfo = '';
+
+      if ( exists $vars->{IB_last_secs} ) {
+         $ibinfo .= "InnoDB $vars->{IB_last_secs}s ";
+         if ( $vars->{IB_got_all} ) {
+            if ( ($mode eq 'T' || $mode eq 'W')
+                  && $vars->{IB_tx_is_truncated} ) {
+               $ibinfo .= ':^|';
+            }
+            else {
+               $ibinfo .= ':-)';
+            }
+         }
+         else {
+            $ibinfo .= ':-(';
+         }
+      }
+      $result = sprintf(
+         "%-${mode_width}s %${remaining_width}s",
+         $modeline,
+         join(', ', grep { $_ } (
+            $cxns[0],
+            $uptime,
+            $ibinfo,
+            shorten($qps) . " QPS",
+            ($vars->{Threads} || 0) . " thd",
+            $cxn)));
+   }
+   else {
+      $result = sprintf(
+         "%-${mode_width}s %${remaining_width}s",
+         $modeline,
+         $cxn);
+   }
+
+   return $config{color}->{val} ? [ $result, 'bold reverse' ] : $result;
+}
+
+# Database connections {{{3
+sub add_new_dsn {
+   my ( $name ) = @_;
+
+   if ( defined $name ) {
+      $name =~ s/[\s:;]//g;
+   }
+
+   if ( !$name ) {
+      print word_wrap("Choose a name for the connection.  It cannot contain "
+         . "whitespace, colons or semicolons."), "\n\n";
+      do {
+         $name = prompt("Enter a name");
+         $name =~ s/[\s:;]//g;
+      } until ( $name );
+   }
+
+   my $dsn;
+   do {
+      $clear_screen_sub->();
+      print "Typical DSN strings look like\n   DBI:mysql:;host=hostname;port=port\n"
+         . "The db and port are optional and can usually be omitted.\n"
+         . "If you specify 'mysql_read_default_group=mysql' many options can be read\n"
+         . "from your mysql options files (~/.my.cnf, /etc/my.cnf).\n\n";
+      $dsn = prompt("Enter a DSN string", undef, "DBI:mysql:;mysql_read_default_group=mysql;host=$name");
+   } until ( $dsn );
+
+   $clear_screen_sub->();
+   my $dl_table = prompt("Optional: enter a table (must not exist) to use when resetting InnoDB deadlock information",
+      undef, 'test.innotop_dl');
+
+   $connections{$name} = {
+      dsn      => $dsn,
+      dl_table => $dl_table,
+   };
+}
+
+sub add_new_server_group {
+   my ( $name ) = @_;
+
+   if ( defined $name ) {
+      $name =~ s/[\s:;]//g;
+   }
+
+   if ( !$name ) {
+      print word_wrap("Choose a name for the group.  It cannot contain "
+         . "whitespace, colons or semicolons."), "\n\n";
+      do {
+         $name = prompt("Enter a name");
+         $name =~ s/[\s:;]//g;
+      } until ( $name );
+   }
+
+   my @cxns;
+   do {
+      $clear_screen_sub->();
+      @cxns = select_cxn("Choose servers for $name", keys %connections);
+   } until ( @cxns );
+
+   $server_groups{$name} = \@cxns;
+   return $name;
+}
+
+sub get_var_set {
+   my ( $name ) = @_;
+   while ( !$name || !exists($var_sets{$config{$name}->{val}}) ) {
+      $name = choose_var_set($name);
+   }
+   return $var_sets{$config{$name}->{val}}->{text};
+}
+
+sub add_new_var_set {
+   my ( $name ) = @_;
+
+   if ( defined $name ) {
+      $name =~ s/\W//g;
+   }
+
+   if ( !$name ) {
+      do {
+         $name = prompt("Enter a name");
+         $name =~ s/\W//g;
+      } until ( $name );
+   }
+
+   my $variables;
+   do {
+      $clear_screen_sub->();
+      $variables = prompt("Enter variables for $name", undef );
+   } until ( $variables );
+
+   $var_sets{$name} = { text => $variables, user => 1 };
+}
+
+sub next_server {
+   my $mode     = $config{mode}->{val};
+   my @cxns     = sort keys %connections;
+   my ($cur)    = get_connections($mode);
+   $cur         ||= $cxns[0];
+   my $pos      = grep { $_ lt $cur } @cxns;
+   my $newpos   = ($pos + 1) % @cxns;
+   $modes{$mode}->{server_group} = '';
+   $modes{$mode}->{connections} = [ $cxns[$newpos] ];
+   $clear_screen_sub->();
+}
+
+sub next_server_group {
+   my $mode = shift || $config{mode}->{val};
+   my @grps = sort keys %server_groups;
+   my $curr = $modes{$mode}->{server_group};
+
+   return unless @grps;
+
+   if ( $curr ) {
+      # Find the current group's position.
+      my $pos = 0;
+      while ( $curr ne $grps[$pos] ) {
+         $pos++;
+      }
+      $modes{$mode}->{server_group} = $grps[ ($pos + 1) % @grps ];
+   }
+   else {
+      $modes{$mode}->{server_group} = $grps[0];
+   }
+}
+
+# Get a list of connection names used in this mode.
+sub get_connections {
+   if ( $file ) {
+      return qw(file);
+   }
+   my $mode = shift || $config{mode}->{val};
+   my @connections = $modes{$mode}->{server_group}
+      ? @{$server_groups{$modes{$mode}->{server_group}}}
+      : @{$modes{$mode}->{connections}};
+   if ( $modes{$mode}->{one_connection} ) {
+      @connections = @connections ? $connections[0] : ();
+   }
+   return unique(@connections);
+}
+
+# Get a list of tables used in this mode.  If innotop is running non-interactively, just use the first.
+sub get_visible_tables {
+   my $mode = shift || $config{mode}->{val};
+   my @tbls = @{$modes{$mode}->{visible_tables}};
+   if ( $opts{n} ) {
+      return $tbls[0];
+   }
+   else {
+      return @tbls;
+   }
+}
+
+# Choose from among available connections or server groups.
+# If the mode has a server set in use, prefers that instead.
+sub choose_connections {
+   $clear_screen_sub->();
+   my $mode    = $config{mode}->{val};
+   my $meta    =  { map { $_ => $connections{$_}->{dsn} } keys %connections };
+   foreach my $group ( keys %server_groups ) {
+      $meta->{"#$group"} = join(' ', @{$server_groups{$group}});
+   }
+
+   my $choices = prompt_list("Choose connections or a group for $mode mode",
+      undef, sub { return keys %$meta }, $meta);
+
+   my @choices = unique(grep { $_ } split(/\s+/, $choices));
+   if ( @choices ) {
+      if ( $choices[0] =~ s/^#// && exists $server_groups{$choices[0]} ) {
+         $modes{$mode}->{server_group} = $choices[0];
+      }
+      else {
+         $modes{$mode}->{connections} = [ grep { exists $connections{$_} } @choices ];
+      }
+   }
+}
+
+# Accepts a DB connection name and the name of a prepared query (e.g. status, kill).
+# Also a list of params for the prepared query.  This allows not storing prepared
+# statements globally.  Returns a $sth that's been executed.
+# ERROR-HANDLING SEMANTICS: if the statement throws an error, propagate, but if the
+# connection has gone away or can't connect, DO NOT.  Just return undef.
+sub do_stmt {
+   my ( $cxn, $stmt_name, @args ) = @_;
+
+   return undef if $file;
+
+   # Test if the cxn should not even be tried
+   return undef if $dbhs{$cxn}
+      && $dbhs{$cxn}->{err_count} 
+      && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} )
+      && $dbhs{$cxn}->{wake_up} > $clock;
+
+   my $sth;
+   my $retries = 1;
+   my $success = 0;
+   TRY:
+   while ( $retries-- >= 0 && !$success ) {
+
+      eval {
+         my $dbh = connect_to_db($cxn);
+
+         # If the prepared query doesn't exist, make it.
+         if ( !exists $dbhs{$cxn}->{stmts}->{$stmt_name} ) {
+            $dbhs{$cxn}->{stmts}->{$stmt_name} = $stmt_maker_for{$stmt_name}->($dbh);
+         }
+
+         $sth = $dbhs{$cxn}->{stmts}->{$stmt_name};
+         if ( $sth ) {
+            $sth->execute(@args);
+         }
+         $success = 1;
+      };
+      if ( $EVAL_ERROR ) {
+         if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) {
+            handle_cxn_error($cxn, $EVAL_ERROR);
+         }
+         else {
+            die "$cxn $stmt_name: $EVAL_ERROR";
+         }
+         if ( $retries < 0 ) {
+            $sth = undef;
+         }
+      }
+   }
+
+   if ( $sth && $sth->{NUM_OF_FIELDS} ) {
+      sleep($stmt_sleep_time_for{$stmt_name}) if $stmt_sleep_time_for{$stmt_name};
+      return $sth;
+   }
+}
+
+# Keeps track of error count, sleep times till retries, etc etc.
+# When there's an error we retry the connection every so often, increasing in
+# Fibonacci series to prevent too much banging on the server.
+sub handle_cxn_error {
+   my ( $cxn, $err ) = @_;
+   my $meta = $dbhs{$cxn};
+   $meta->{err_count}++;
+
+   # This is used so errors that have to do with permissions needed by the current
+   # mode will get displayed as long as we're in this mode, but get ignored if the
+   # mode changes.
+   $meta->{mode} = $config{mode}->{val};
+
+   # Strip garbage from the error text if possible.
+   $err =~ s/\s+/ /g;
+   if ( $err =~ m/failed: (.*?) at \S*innotop line/ ) {
+      $err = $1;
+   }
+
+   $meta->{last_err}   = $err;
+   my $sleep_time      = $meta->{this_sleep} + $meta->{prev_sleep};
+   $meta->{prev_sleep} = $meta->{this_sleep};
+   $meta->{this_sleep} = $sleep_time;
+   $meta->{wake_up}    = $clock + $sleep_time;
+   if ( $config{show_cxn_errors}->{val} ) {
+      print STDERR "Error at tick $clock $cxn $err" if $config{debug}->{val};
+   }
+}
+
+# Accepts a DB connection name and a (string) query.  Returns a $sth that's been
+# executed.
+sub do_query {
+   my ( $cxn, $query ) = @_;
+
+   return undef if $file;
+
+   # Test if the cxn should not even be tried
+   return undef if $dbhs{$cxn}
+      && $dbhs{$cxn}->{err_count} 
+      && ( !$dbhs{$cxn}->{dbh} || !$dbhs{$cxn}->{dbh}->{Active} || $dbhs{$cxn}->{mode} eq $config{mode}->{val} )
+      && $dbhs{$cxn}->{wake_up} > $clock;
+
+   my $sth;
+   my $retries = 1;
+   my $success = 0;
+   TRY:
+   while ( $retries-- >= 0 && !$success ) {
+
+      eval {
+         my $dbh = connect_to_db($cxn);
+
+         $sth = $dbh->prepare($query);
+         $sth->execute();
+         $success = 1;
+      };
+      if ( $EVAL_ERROR ) {
+         if ( $EVAL_ERROR =~ m/$nonfatal_errs/ ) {
+            handle_cxn_error($cxn, $EVAL_ERROR);
+         }
+         else {
+            die $EVAL_ERROR;
+         }
+         if ( $retries < 0 ) {
+            $sth = undef;
+         }
+      }
+   }
+ 
+   return $sth;
+}
+
+sub get_uptime {
+   my ( $cxn ) = @_;
+   $dbhs{$cxn}->{start_time} ||= time();
+   # Avoid dividing by zero
+   return (time() - $dbhs{$cxn}->{start_time}) || .001;
+}
+
+sub connect_to_db {
+   my ( $cxn ) = @_;
+
+   $dbhs{$cxn} ||= {
+      stmts      => {},  # bucket for prepared statements.
+      prev_sleep => 0,
+      this_sleep => 1,
+      wake_up    => 0,
+      start_time => 0,
+      dbh        => undef,
+   };
+   my $href = $dbhs{$cxn};
+
+   if ( !$href->{dbh} || ref($href->{dbh}) !~ m/DBI/ || !$href->{dbh}->ping ) {
+      my $dbh = get_new_db_connection($cxn);
+      @{$href}{qw(dbh err_count wake_up this_sleep start_time prev_sleep)}
+               = ($dbh, 0, 0, 1, 0, 0);
+
+      # Derive and store the server's start time in hi-res
+      my $uptime = $dbh->selectrow_hashref("show status like 'Uptime'")->{value};
+      $href->{start_time} = time() - $uptime;
+
+      # Set timeouts so an unused connection stays alive.
+      # For example, a connection might be used in Q mode but idle in T mode.
+      if ( version_ge($dbh, '4.0.3')) {
+         my $timeout = $config{cxn_timeout}->{val};
+         $dbh->do("set session wait_timeout=$timeout, interactive_timeout=$timeout");
+      }
+   }
+   return $href->{dbh};
+}
+
+# Compares versions like 5.0.27 and 4.1.15-standard-log
+sub version_ge {
+   my ( $dbh, $target ) = @_;
+   my $version = sprintf('%03d%03d%03d', $dbh->{mysql_serverinfo} =~ m/(\d+)/g);
+   return $version ge sprintf('%03d%03d%03d', $target =~ m/(\d+)/g);
+}
+
+# Extracts status values that can be gleaned from the DBD driver without doing a whole query.
+sub get_driver_status {
+   my @cxns = @_;
+   if ( !$info_gotten{driver_status}++ ) {
+      foreach my $cxn ( @cxns ) {
+         next unless $dbhs{$cxn} && $dbhs{$cxn}->{dbh} && $dbhs{$cxn}->{dbh}->{Active};
+         $vars{$cxn}->{$clock} ||= {};
+         my $vars = $vars{$cxn}->{$clock};
+         my %res = map {  $_ =~ s/ +/_/g; $_ } $dbhs{$cxn}->{dbh}->{mysql_stat} =~ m/(\w[^:]+): ([\d\.]+)/g;
+         map { $vars->{$_} ||= $res{$_} } keys %res;
+         $vars->{Uptime_hires} ||= get_uptime($cxn);
+         $vars->{cxn} = $cxn;
+      }
+   }
+}
+
+sub get_new_db_connection {
+   my ( $connection, $destroy ) = @_;
+   if ( $file ) {
+      die "You can't connect to a MySQL server while monitoring a file.  This is probably a bug.";
+   }
+
+   my $dsn = $connections{$connection}
+      or die "No connection named '$connection' is defined in your configuration";
+
+   if ( !defined $dsn->{have_user} ) {
+      my $answer = prompt("Do you want to specify a username for $connection?", undef, 'n');
+      $dsn->{have_user} = $answer && $answer =~ m/1|y/i;
+   }
+
+   if ( !defined $dsn->{have_pass} ) {
+      my $answer = prompt("Do you want to specify a password for $connection?", undef, 'n');
+      $dsn->{have_pass} = $answer && $answer =~ m/1|y/i;
+   }
+
+   if ( !$dsn->{user} && $dsn->{have_user} ) {
+      my $user = $ENV{USERNAME} || $ENV{USER} || getlogin() || getpwuid($REAL_USER_ID) || undef;
+      $dsn->{user} = prompt("Enter username for $connection", undef, $user);
+   }
+
+   if ( !defined $dsn->{user} ) {
+      $dsn->{user} = '';
+   }
+
+   if ( !$dsn->{pass} && !$dsn->{savepass} && $dsn->{have_pass} ) {
+      $dsn->{pass} = prompt_noecho("Enter password for '$dsn->{user}' on $connection");
+      print "\n";
+      if ( !defined($dsn->{savepass}) ) {
+         my $answer = prompt("Save password in plain text in the config file?", undef, 'y');
+         $dsn->{savepass} = $answer && $answer =~ m/1|y/i;
+      }
+   }
+
+   my $dbh = DBI->connect(
+      $dsn->{dsn}, $dsn->{user}, $dsn->{pass},
+      { RaiseError => 1, PrintError => 0, AutoCommit => 1 });
+   $dbh->{InactiveDestroy} = 1 unless $destroy; # Can't be set in $db_options
+   $dbh->{FetchHashKeyName} = 'NAME_lc'; # Lowercases all column names for fetchrow_hashref
+   return $dbh;
+}
+
+sub get_cxn_errors {
+   my @cxns = @_;
+   return () unless $config{show_cxn_errors_in_tbl}->{val};
+   return
+      map  { [ $_ . ': ' . $dbhs{$_}->{last_err}, 'red' ] }
+      grep { $dbhs{$_} && $dbhs{$_}->{err_count} && $dbhs{$_}->{mode} eq $config{mode}->{val} }
+      @cxns;
+}
+
+# Setup and tear-down functions {{{2
+
+# Takes a string and turns it into a hashref you can apply to %tbl_meta tables.  The string
+# can be in the form 'foo, bar, foo/bar, foo as bar' much like a SQL SELECT statement.
+sub compile_select_stmt {
+   my ($str) = @_;
+   my @exps = $str =~ m/\s*([^,]+(?i:\s+as\s+[^,\s]+)?)\s*(?=,|$)/g;
+   my %cols;
+   my @visible;
+   foreach my $exp ( @exps ) {
+      my ( $text, $colname );
+      if ( $exp =~ m/as\s+(\w+)\s*/ ) {
+         $colname = $1;
+         $exp =~ s/as\s+(\w+)\s*//;
+         $text    = $exp;
+      }
+      else {
+         $text = $colname = $exp;
+      }
+      my ($func, $err) = compile_expr($text);
+      $cols{$colname} = {
+         src  => $text,
+         hdr  => $colname,
+         num  => 0,
+         func => $func,
+      };
+      push @visible, $colname;
+   }
+   return (\%cols, \@visible);
+}
+
+# compile_filter {{{3
+sub compile_filter {
+   my ( $text ) = @_;
+   my ( $sub, $err );
+   eval "\$sub = sub { my \$set = shift; $text }";
+   if ( $EVAL_ERROR ) {
+      $EVAL_ERROR =~ s/at \(eval.*$//;
+      $sub = sub { return $EVAL_ERROR };
+      $err = $EVAL_ERROR;
+   }
+   return ( $sub, $err );
+}
+
+# compile_expr {{{3
+sub compile_expr {
+   my ( $expr ) = @_;
+   # Leave built-in functions alone so they get called as Perl functions, unless
+   # they are the only word in $expr, in which case treat them as hash keys.
+   if ( $expr =~ m/\W/ ) {
+      $expr =~ s/(?<!\{|\$)\b([A-Za-z]\w{2,})\b/is_func($1) ? $1 : "\$set->{$1}"/eg;
+   }
+   else {
+      $expr = "\$set->{$expr}";
+   }
+   my ( $sub, $err );
+   my $quoted = quotemeta($expr);
+   eval qq{
+      \$sub = sub {
+         my (\$set, \$cur, \$pre) = \@_;
+         my \$val = eval { $expr };
+         if ( \$EVAL_ERROR && \$config{debug}->{val} ) {
+            \$EVAL_ERROR =~ s/ at \\(eval.*//s;
+            die "\$EVAL_ERROR in expression $quoted";
+         }
+         return \$val;
+      }
+   };
+   if ( $EVAL_ERROR ) {
+      if ( $config{debug}->{val} ) {
+         die $EVAL_ERROR;
+      }
+      $EVAL_ERROR =~ s/ at \(eval.*$//;
+      $sub = sub { return $EVAL_ERROR };
+      $err = $EVAL_ERROR;
+   }
+   return ( $sub, $err );
+}
+
+# finish {{{3
+# This is a subroutine because it's called from a key to quit the program.
+sub finish {
+   save_config();
+   ReadMode('normal') unless $opts{n};
+   print "\n";
+   exit(0);
+}
+
+# core_dump {{{3
+sub core_dump {
+   my $msg = shift;
+   if ($config{debugfile}->{val} && $config{debug}->{val}) {
+      eval {
+         open my $file, '>>', $config{debugfile}->{val};
+         if ( %vars ) {
+            print $file "Current variables:\n" . Dumper(\%vars);
+         }
+         close $file;
+      };
+   }
+   print $msg;
+}
+
+# load_config {{{3
+sub load_config {
+
+   my $filename = $opts{c} || "$homepath/.innotop/innotop.ini";
+   my $dirname  = dirname($filename);
+   if ( -f $dirname && !$opts{c} ) {
+      # innotop got upgraded and this is the old config file.
+      my $answer = pause("Innotop's default config location has moved to $filename.  Move old config file $dirname there now? y/n");
+      if ( lc $answer eq 'y' ) {
+         rename($dirname, "$homepath/innotop.ini")
+            or die "Can't rename '$dirname': $OS_ERROR";
+         mkdir($dirname) or die "Can't create directory '$dirname': $OS_ERROR";
+         mkdir("$dirname/plugins") or die "Can't create directory '$dirname/plugins': $OS_ERROR";
+         rename("$homepath/innotop.ini", $filename)
+            or die "Can't rename '$homepath/innotop.ini' to '$filename': $OS_ERROR";
+      }
+      else {
+         print "\nInnotop will now exit so you can fix the config file.\n";
+         exit(0);
+      }
+   }
+
+   if ( ! -d $dirname ) {
+      mkdir $dirname
+         or die "Can't create directory '$dirname': $OS_ERROR";
+   }
+   if ( ! -d "$dirname/plugins" ) {
+      mkdir "$dirname/plugins"
+         or die "Can't create directory '$dirname/plugins': $OS_ERROR";
+   }
+
+   if ( -f $filename ) {
+      open my $file, "<", $filename or die("Can't open '$filename': $OS_ERROR");
+
+      # Check config file version.  Just ignore if either innotop or the file has
+      # garbage in the version number.
+      if ( defined(my $line = <$file>) && $VERSION =~ m/\d/ ) {
+         chomp $line;
+         if ( my ($maj, $min, $rev) = $line =~ m/^version=(\d+)\.(\d+)(?:\.(\d+))?$/ ) {
+            $rev ||= 0;
+            my $cfg_ver          = sprintf('%03d-%03d-%03d', $maj, $min, $rev);
+            ( $maj, $min, $rev ) = $VERSION =~ m/^(\d+)\.(\d+)(?:\.(\d+))?$/;
+            $rev ||= 0;
+            my $innotop_ver      = sprintf('%03d-%03d-%03d', $maj, $min, $rev);
+
+            if ( $cfg_ver gt $innotop_ver ) {
+               pause("The config file is for a newer version of innotop and may not be read correctly.");
+            }
+            else {
+               my @ver_history = @config_versions;
+               while ( my ($start, $end) = splice(@ver_history, 0, 2) ) {
+                  # If the config file is between the endpoints and innotop is greater than
+                  # the endpoint, innotop has a newer config file format than the file.
+                  if ( $cfg_ver ge $start && $cfg_ver lt $end && $innotop_ver ge $end ) {
+                     my $msg = "innotop's config file format has changed.  Overwrite $filename?  y or n";
+                     if ( pause($msg) eq 'n' ) {
+                        $config{readonly}->{val} = 1;
+                        print "\ninnotop will not save any configuration changes you make.";
+                        pause();
+                        print "\n";
+                     }
+                     close $file;
+                     return;
+                  }
+               }
+            }
+         }
+      }
+
+      while ( my $line = <$file> ) {
+         chomp $line;
+         next unless $line =~ m/^\[([a-z_]+)\]$/;
+         if ( exists $config_file_sections{$1} ) {
+            $config_file_sections{$1}->{reader}->($file);
+         }
+         else {
+            warn "Unknown config file section '$1'";
+         }
+      }
+      close $file or die("Can't close $filename: $OS_ERROR");
+   }
+
+}
+
+# Do some post-processing on %tbl_meta: compile src properties into func etc.
+sub post_process_tbl_meta {
+   foreach my $table ( values %tbl_meta ) {
+      foreach my $col_name ( keys %{$table->{cols}} ) {
+         my $col_def = $table->{cols}->{$col_name};
+         my ( $sub, $err ) = compile_expr($col_def->{src});
+         $col_def->{func} = $sub;
+      }
+   }
+}
+
+# load_config_plugins {{{3
+sub load_config_plugins {
+   my ( $file ) = @_;
+
+   # First, find a list of all plugins that exist on disk, and get information about them.
+   my $dir = $config{plugin_dir}->{val};
+   foreach my $p_file ( <$dir/*.pm> ) {
+      my ($package, $desc);
+      eval {
+         open my $p_in, "<", $p_file or die $OS_ERROR;
+         while ( my $line = <$p_in> ) {
+            chomp $line;
+            if ( $line =~ m/^package\s+(.*?);/ ) {
+               $package = $1;
+            }
+            elsif ( $line =~ m/^# description: (.*)/ ) {
+               $desc = $1;
+            }
+            last if $package && $desc;
+         }
+         close $p_in;
+      };
+      if ( $package ) {
+         $plugins{$package} = {
+            file   => $p_file,
+            desc   => $desc,
+            class  => $package,
+            active => 0,
+         };
+         if ( $config{debug}->{val} && $EVAL_ERROR ) {
+            die $EVAL_ERROR;
+         }
+      }
+   }
+
+   # Now read which ones the user has activated.  Each line simply represents an active plugin.
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+      next unless $line && $plugins{$line};
+
+      my $obj;
+      eval {
+         require $plugins{$line}->{file};
+         $obj = $line->new(%pluggable_vars);
+         foreach my $event ( $obj->register_for_events() ) {
+            my $queue = $event_listener_for{$event};
+            if ( $queue ) {
+               push @$queue, $obj;
+            }
+         }
+      };
+      if ( $config{debug}->{val} && $EVAL_ERROR ) {
+         die $EVAL_ERROR;
+      }
+      if ( $obj ) {
+         $plugins{$line}->{active} = 1;
+         $plugins{$line}->{object} = $obj;
+      }
+   }
+}
+
+# save_config_plugins {{{3
+sub save_config_plugins {
+   my $file = shift;
+   foreach my $class ( sort keys %plugins ) {
+      next unless $plugins{$class}->{active};
+      print $file "$class\n";
+   }
+}
+
+# load_config_active_server_groups {{{3
+sub load_config_active_server_groups {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $mode, $group ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $mode && $group
+         && exists $modes{$mode} && exists $server_groups{$group};
+      $modes{$mode}->{server_group} = $group;
+   }
+}
+
+# save_config_active_server_groups {{{3
+sub save_config_active_server_groups {
+   my $file = shift;
+   foreach my $mode ( sort keys %modes ) {
+      print $file "$mode=$modes{$mode}->{server_group}\n";
+   }
+}
+
+# load_config_server_groups {{{3
+sub load_config_server_groups {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $name && $rest;
+      my @vars = unique(grep { $_ && exists $connections{$_} } split(/\s+/, $rest));
+      next unless @vars;
+      $server_groups{$name} = \@vars;
+   }
+}
+
+# save_config_server_groups {{{3
+sub save_config_server_groups {
+   my $file = shift;
+   foreach my $set ( sort keys %server_groups ) {
+      print $file "$set=", join(' ', @{$server_groups{$set}}), "\n";
+   }
+}
+
+# load_config_varsets {{{3
+sub load_config_varsets {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $name, $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $name && $rest;
+      $var_sets{$name} = {
+         text => $rest,
+         user => 1,
+      };
+   }
+}
+
+# save_config_varsets {{{3
+sub save_config_varsets {
+   my $file = shift;
+   foreach my $varset ( sort keys %var_sets ) {
+      next unless $var_sets{$varset}->{user};
+      print $file "$varset=$var_sets{$varset}->{text}\n";
+   }
+}
+
+# load_config_group_by {{{3
+sub load_config_group_by {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $tbl && exists $tbl_meta{$tbl};
+      my @parts = unique(grep { exists($tbl_meta{$tbl}->{cols}->{$_}) } split(/\s+/, $rest));
+      $tbl_meta{$tbl}->{group_by} = [ @parts ];
+      $tbl_meta{$tbl}->{cust}->{group_by} = 1;
+   }
+}
+
+# save_config_group_by {{{3
+sub save_config_group_by {
+   my $file = shift;
+   foreach my $tbl ( sort keys %tbl_meta ) {
+      next if $tbl_meta{$tbl}->{temp};
+      next unless $tbl_meta{$tbl}->{cust}->{group_by};
+      my $aref = $tbl_meta{$tbl}->{group_by};
+      print $file "$tbl=", join(' ', @$aref), "\n";
+   }
+}
+
+# load_config_filters {{{3
+sub load_config_filters {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key, $rest ) = $line =~ m/^(.+?)=(.*)$/;
+      next unless $key && $rest;
+
+      my %parts = $rest =~ m/(\w+)='((?:(?!(?<!\\)').)*)'/g; # Properties are single-quoted
+      next unless $parts{text} && $parts{tbls};
+
+      foreach my $prop ( keys %parts ) {
+         # Un-escape escaping
+         $parts{$prop} =~ s/\\\\/\\/g;
+         $parts{$prop} =~ s/\\'/'/g;
+      }
+
+      my ( $sub, $err ) = compile_filter($parts{text});
+      my @tbls = unique(split(/\s+/, $parts{tbls}));
+      @tbls = grep { exists $tbl_meta{$_} } @tbls;
+      $filters{$key} = {
+         func => $sub,
+         text => $parts{text},
+         user => 1,
+         name => $key,
+         note => 'User-defined filter',
+         tbls => \@tbls,
+      }
+   }
+}
+
+# save_config_filters {{{3
+sub save_config_filters {
+   my $file = shift;
+   foreach my $key ( sort keys %filters ) {
+      next if !$filters{$key}->{user} || $filters{$key}->{quick};
+      my $text = $filters{$key}->{text};
+      $text =~ s/([\\'])/\\$1/g;
+      my $tbls = join(" ", @{$filters{$key}->{tbls}});
+      print $file "$key=text='$text' tbls='$tbls'\n";
+   }
+}
+
+# load_config_visible_tables {{{3
+sub load_config_visible_tables {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $mode, $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $mode && exists $modes{$mode};
+      $modes{$mode}->{visible_tables} =
+         [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $rest)) ];
+      $modes{$mode}->{cust}->{visible_tables} = 1;
+   }
+}
+
+# save_config_visible_tables {{{3
+sub save_config_visible_tables {
+   my $file = shift;
+   foreach my $mode ( sort keys %modes ) {
+      next unless $modes{$mode}->{cust}->{visible_tables};
+      my $tables = $modes{$mode}->{visible_tables};
+      print $file "$mode=", join(' ', @$tables), "\n";
+   }
+}
+
+# load_config_sort_cols {{{3
+sub load_config_sort_cols {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $key && exists $tbl_meta{$key};
+      $tbl_meta{$key}->{sort_cols} = $rest;
+      $tbl_meta{$key}->{cust}->{sort_cols} = 1;
+      $tbl_meta{$key}->{sort_func} = make_sort_func($tbl_meta{$key});
+   }
+}
+
+# save_config_sort_cols {{{3
+sub save_config_sort_cols {
+   my $file = shift;
+   foreach my $tbl ( sort keys %tbl_meta ) {
+      next unless $tbl_meta{$tbl}->{cust}->{sort_cols};
+      my $col = $tbl_meta{$tbl}->{sort_cols};
+      print $file "$tbl=$col\n";
+   }
+}
+
+# load_config_active_filters {{{3
+sub load_config_active_filters {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $tbl , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $tbl && exists $tbl_meta{$tbl};
+      my @parts = unique(grep { exists($filters{$_}) } split(/\s+/, $rest));
+      @parts = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @parts;
+      $tbl_meta{$tbl}->{filters} = [ @parts ];
+      $tbl_meta{$tbl}->{cust}->{filters} = 1;
+   }
+}
+
+# save_config_active_filters {{{3
+sub save_config_active_filters {
+   my $file = shift;
+   foreach my $tbl ( sort keys %tbl_meta ) {
+      next if $tbl_meta{$tbl}->{temp};
+      next unless $tbl_meta{$tbl}->{cust}->{filters};
+      my $aref = $tbl_meta{$tbl}->{filters};
+      print $file "$tbl=", join(' ', @$aref), "\n";
+   }
+}
+
+# load_config_active_columns {{{3
+sub load_config_active_columns {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $key && exists $tbl_meta{$key};
+      my @parts = grep { exists($tbl_meta{$key}->{cols}->{$_}) } unique split(/ /, $rest);
+      $tbl_meta{$key}->{visible} = [ @parts ];
+      $tbl_meta{$key}->{cust}->{visible} = 1;
+   }
+}
+
+# save_config_active_columns {{{3
+sub save_config_active_columns {
+   my $file = shift;
+   foreach my $tbl ( sort keys %tbl_meta ) {
+      next unless $tbl_meta{$tbl}->{cust}->{visible};
+      my $aref = $tbl_meta{$tbl}->{visible};
+      print $file "$tbl=", join(' ', @$aref), "\n";
+   }
+}
+
+# save_config_tbl_meta {{{3
+sub save_config_tbl_meta {
+   my $file = shift;
+   foreach my $tbl ( sort keys %tbl_meta ) {
+      foreach my $col ( keys %{$tbl_meta{$tbl}->{cols}} ) {
+         my $meta = $tbl_meta{$tbl}->{cols}->{$col};
+         next unless $meta->{user};
+         print $file "$col=", join(
+            " ",
+            map {
+               # Some properties (trans) are arrays, others scalars
+               my $val = ref($meta->{$_}) ? join(',', @{$meta->{$_}}) : $meta->{$_};
+               $val =~ s/([\\'])/\\$1/g;  # Escape backslashes and single quotes
+               "$_='$val'";               # Enclose in single quotes
+            }
+            grep { $_ ne 'func' }
+            keys %$meta
+         ), "\n";
+      }
+   }
+}
+
+# save_config_config {{{3
+sub save_config_config {
+   my $file = shift;
+   foreach my $key ( sort keys %config ) {
+      eval {
+      if ( $key ne 'password' || $config{savepass}->{val} ) {
+         print $file "# $config{$key}->{note}\n"
+            or die "Cannot print to file: $OS_ERROR";
+         my $val = $config{$key}->{val};
+         $val = '' unless defined($val);
+         if ( ref( $val ) eq 'ARRAY' ) {
+            print $file "$key="
+               . join( " ", @$val ) . "\n"
+               or die "Cannot print to file: $OS_ERROR";
+         }
+         elsif ( ref( $val ) eq 'HASH' ) {
+            print $file "$key="
+               . join( " ",
+                  map { "$_:$val->{$_}" } keys %$val
+               ) . "\n";
+         }
+         else {
+            print $file "$key=$val\n";
+         }
+      }
+      };
+      if ( $EVAL_ERROR ) { print "$EVAL_ERROR in $key"; };
+   }
+
+}
+
+# load_config_config {{{3
+sub load_config_config {
+   my ( $file ) = @_;
+
+   # Look in the command-line parameters for things stored in the same slot.
+   my %cmdline =
+      map  { $_->{c} => $opts{$_->{k}} }
+      grep { exists $_->{c} && exists $opts{$_->{k}} }
+      @opt_spec;
+
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $name, $val ) = $line =~ m/^(.+?)=(.*)$/;
+      next unless defined $name && defined $val;
+
+      # Values might already have been set at the command line.
+      $val = defined($cmdline{$name}) ? $cmdline{$name} : $val;
+
+      # Validate the incoming values...
+      if ( $name && exists( $config{$name} ) ) {
+         if ( !$config{$name}->{pat} || $val =~ m/$config{$name}->{pat}/ ) {
+            $config{$name}->{val} = $val;
+            $config{$name}->{read} = 1;
+         }
+      }
+   }
+}
+
+# load_config_tbl_meta {{{3
+sub load_config_tbl_meta {
+   my ( $file ) = @_;
+
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      # Each tbl_meta section has all the properties defined in %col_props.
+      my ( $col , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $col;
+      my %parts = $rest =~ m/(\w+)='((?:(?!(?<!\\)').)*)'/g; # Properties are single-quoted
+
+      # Each section read from the config file has one extra property: which table it
+      # goes in.
+      my $tbl  = $parts{tbl}     or die "There's no table for tbl_meta $col";
+      my $meta = $tbl_meta{$tbl} or die "There's no table in tbl_meta named $tbl";
+
+      # The section is user-defined by definition (if that makes sense).
+      $parts{user} = 1;
+
+      # The column may already exist in the table, in which case this is just a
+      # customization.
+      $meta->{cols}->{$col} ||= {};
+
+      foreach my $prop ( keys %col_props ) {
+         if ( !defined($parts{$prop}) ) {
+            die "Undefined property $prop for column $col in table $tbl";
+         }
+
+         # Un-escape escaping
+         $parts{$prop} =~ s/\\\\/\\/g;
+         $parts{$prop} =~ s/\\'/'/g;
+
+         if ( ref $col_props{$prop} ) {
+            if ( $prop eq 'trans' ) {
+               $meta->{cols}->{$col}->{trans}
+                  = [ unique(grep { exists $trans_funcs{$_} } split(',', $parts{$prop})) ];
+            }
+            else {
+               $meta->{cols}->{$col}->{$prop} = [ split(',', $parts{$prop}) ];
+            }
+         }
+         else {
+            $meta->{cols}->{$col}->{$prop} = $parts{$prop};
+         }
+      }
+
+   }
+}
+
+# save_config {{{3
+sub save_config {
+   return if $config{readonly}->{val};
+   # Save to a temp file first, so a crash doesn't destroy the main config file
+   my $newname  = $opts{c} || "$homepath/.innotop/innotop.ini";
+   my $filename = $newname . '_tmp';
+   open my $file, "+>", $filename
+      or die("Can't write to $filename: $OS_ERROR");
+   print $file "version=$VERSION\n";
+
+   foreach my $section ( @ordered_config_file_sections ) {
+      die "No such config file section $section" unless $config_file_sections{$section};
+      print $file "\n[$section]\n\n";
+      $config_file_sections{$section}->{writer}->($file);
+      print $file "\n[/$section]\n";
+   }
+
+   # Now clobber the main config file with the temp.
+   close $file or die("Can't close $filename: $OS_ERROR");
+   rename($filename, $newname) or die("Can't rename $filename to $newname: $OS_ERROR");
+}
+
+# load_config_connections {{{3
+sub load_config_connections {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $key;
+      my %parts = $rest =~ m/(\S+?)=(\S*)/g;
+      my %conn  = map { $_ => $parts{$_} || '' } @conn_parts;
+      $connections{$key} = \%conn;
+   }
+}
+
+# save_config_connections {{{3
+sub save_config_connections {
+   my $file = shift;
+   foreach my $conn ( sort keys %connections ) {
+      my $href = $connections{$conn};
+      my @keys = $href->{savepass} ? @conn_parts : grep { $_ ne 'pass' } @conn_parts;
+      print $file "$conn=", join(' ', map { "$_=$href->{$_}" } grep { defined $href->{$_} } @keys), "\n";
+   }
+}
+
+sub load_config_colors {
+   my ( $file ) = @_;
+   my %rule_set_for;
+
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $tbl, $rule ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $tbl && $rule;
+      next unless exists $tbl_meta{$tbl};
+      my %parts = $rule =~ m/(\w+)='((?:(?!(?<!\\)').)*)'/g; # Properties are single-quoted
+      next unless $parts{col} && exists $tbl_meta{$tbl}->{cols}->{$parts{col}};
+      next unless $parts{op}  && exists $comp_ops{$parts{op}};
+      next unless defined $parts{arg};
+      next unless defined $parts{color};
+      my @colors = unique(grep { exists $ansicolors{$_} } split(/\W+/, $parts{color}));
+      next unless @colors;
+
+      # Finally!  Enough validation...
+      $rule_set_for{$tbl} ||= [];
+      push @{$rule_set_for{$tbl}}, \%parts;
+   }
+
+   foreach my $tbl ( keys %rule_set_for ) {
+      $tbl_meta{$tbl}->{colors} = $rule_set_for{$tbl};
+      $tbl_meta{$tbl}->{color_func} = make_color_func($tbl_meta{$tbl});
+      $tbl_meta{$tbl}->{cust}->{colors} = 1;
+   }
+}
+
+# save_config_colors {{{3
+sub save_config_colors {
+   my $file = shift;
+   foreach my $tbl ( sort keys %tbl_meta ) {
+      my $meta = $tbl_meta{$tbl};
+      next unless $meta->{cust}->{colors};
+      foreach my $rule ( @{$meta->{colors}} ) {
+         print $file "$tbl=", join(
+            ' ',
+            map {
+               my $val = $rule->{$_};
+               $val =~ s/([\\'])/\\$1/g;  # Escape backslashes and single quotes
+               "$_='$val'";               # Enclose in single quotes
+            }
+            qw(col op arg color)
+         ), "\n";
+      }
+   }
+}
+
+# load_config_active_connections {{{3
+sub load_config_active_connections {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key , $rest ) = $line =~ m/^(.*?)=(.*)$/;
+      next unless $key && exists $modes{$key};
+      my @parts = grep { exists $connections{$_} } split(/ /, $rest);
+      $modes{$key}->{connections} = [ @parts ] if exists $modes{$key};
+   }
+}
+
+# save_config_active_connections {{{3
+sub save_config_active_connections {
+   my $file = shift;
+   foreach my $mode ( sort keys %modes ) {
+      my @connections = get_connections($mode);
+      print $file "$mode=", join(' ', @connections), "\n";
+   }
+}
+
+# load_config_stmt_sleep_times {{{3
+sub load_config_stmt_sleep_times {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key , $val ) = split('=', $line);
+      next unless $key && defined $val && $val =~ m/$num_regex/;
+      $stmt_sleep_time_for{$key} = $val;
+   }
+}
+
+# save_config_stmt_sleep_times {{{3
+sub save_config_stmt_sleep_times {
+   my $file = shift;
+   foreach my $key ( sort keys %stmt_sleep_time_for ) {
+      print $file "$key=$stmt_sleep_time_for{$key}\n";
+   }
+}
+
+# load_config_mvs {{{3
+sub load_config_mvs {
+   my ( $file ) = @_;
+   while ( my $line = <$file> ) {
+      chomp $line;
+      next if $line =~ m/^#/;
+      last if $line =~ m/^\[/;
+
+      my ( $key , $val ) = split('=', $line);
+      next unless $key && defined $val && $val =~ m/$num_regex/;
+      $mvs{$key} = $val;
+   }
+}
+
+# save_config_mvs {{{3
+sub save_config_mvs {
+   my $file = shift;
+   foreach my $key ( sort keys %mvs ) {
+      print $file "$key=$mvs{$key}\n";
+   }
+}
+
+# edit_configuration {{{3
+sub edit_configuration {
+   my $key = '';
+   while ( $key ne 'q' ) {
+      $clear_screen_sub->();
+      my @display_lines = '';
+
+      if ( $key && $cfg_editor_action{$key} ) {
+         $cfg_editor_action{$key}->{func}->();
+      }
+
+      # Show help
+      push @display_lines, create_caption('What configuration do you want to edit?',
+      create_table2(
+         [ sort keys %cfg_editor_action ],
+         { map { $_ => $_ } keys %cfg_editor_action },
+         { map { $_ => $cfg_editor_action{$_}->{note} } keys %cfg_editor_action },
+         { sep => '  ' }));
+
+      draw_screen(\@display_lines);
+      $key = pause('');
+   }
+}
+
+# edit_configuration_variables {{{3
+sub edit_configuration_variables {
+   $clear_screen_sub->();
+   my $mode = $config{mode}->{val};
+
+   my %config_choices
+      = map  { $_ => $config{$_}->{note} || '' }
+        # Only config values that are marked as applying to this mode.
+        grep {
+           my $key = $_;
+           $config{$key}->{conf} &&
+              ( $config{$key}->{conf} eq 'ALL'
+              || grep { $mode eq $_ } @{$config{$key}->{conf}} )
+        } keys %config;
+
+   my $key = prompt_list(
+      "Enter the name of the variable you wish to configure",
+      '',
+      sub{ return keys %config_choices },
+      \%config_choices);
+
+   if ( exists($config_choices{$key}) ) {
+      get_config_interactive($key);
+   }
+}
+
+# edit_color_rules {{{3
+sub edit_color_rules {
+   my ( $tbl ) = @_;
+   $clear_screen_sub->();
+   $tbl ||= choose_visible_table();
+   if ( $tbl && exists($tbl_meta{$tbl}) ) {
+      my $meta = $tbl_meta{$tbl};
+      my @cols = ('', qw(col op arg color));
+      my $info = { map { $_ => { hdr => $_, just => '-', } }  @cols };
+      $info->{label}->{maxw} = 30;
+      my $key;
+      my $selected_rule;
+
+      # This loop builds a tabular view of the rules.
+      do {
+
+         # Show help
+         if ( $key && $key eq '?' ) {
+            my @display_lines = '';
+            push @display_lines, create_caption('Editor key mappings',
+            create_table2(
+               [ sort keys %color_editor_action ],
+               { map { $_ => $_ } keys %color_editor_action },
+               { map { $_ => $color_editor_action{$_}->{note} } keys %color_editor_action },
+               { sep => '  ' }));
+            draw_screen(\@display_lines);
+            pause();
+            $key = '';
+         }
+         else {
+
+            # Do the action specified
+            $selected_rule ||= 0;
+            if ( $key && $color_editor_action{$key} ) {
+               $selected_rule = $color_editor_action{$key}->{func}->($tbl, $selected_rule);
+               $selected_rule ||= 0;
+            }
+
+            # Build the table of rules.  If the terminal has color, the selected rule
+            # will be highlighted; otherwise a > at the left will indicate.
+            my $data = $meta->{colors} || [];
+            foreach my $i ( 0..@$data - 1  ) {
+               $data->[$i]->{''} = $i == $selected_rule ? '>' : '';
+            }
+            my @display_lines = create_table(\@cols, $info, $data);
+
+            # Highlight selected entry
+            for my $i ( 0 .. $#display_lines ) {
+               if ( $display_lines[$i] =~ m/^>/ ) {
+                  $display_lines[$i] = [ $display_lines[$i], 'reverse' ];
+               }
+            }
+
+            # Draw the screen and wait for a command.
+            unshift @display_lines, '',
+               "Editing color rules for $meta->{capt}.  Press ? for help, q to "
+               . "quit.", '';
+            draw_screen(\@display_lines);
+            print "\n\n", word_wrap('Rules are applied in order from top to '
+               . 'bottom.  The first matching rule wins and prevents the '
+               . 'rest of the rules from being applied.');
+            $key = pause('');
+         }
+      } while ( $key ne 'q' );
+      $meta->{color_func} = make_color_func($meta);
+   }
+}
+
+# add_quick_filter {{{3
+sub add_quick_filter {
+   my $tbl = choose_visible_table();
+   if ( $tbl && exists($tbl_meta{$tbl}) ) {
+      print "\n";
+      my $response = prompt_list(
+         "Enter column name and filter text",
+         '',
+         sub { return keys %{$tbl_meta{$tbl}->{cols}} },
+         ()
+      );
+      my ( $col, $text ) = split(/\s+/, $response, 2);
+
+      # You can't filter on a nonexistent column.  But if you filter on a pivoted
+      # table, the columns are different, so on a pivoted table, allow filtering
+      # on the 'name' column.
+      # NOTE: if a table is pivoted and un-pivoted, this will likely cause crashes.
+      # Currently not an issue since there's no way to toggle pivot/nopivot.
+      return unless $col && $text &&
+         (exists($tbl_meta{$tbl}->{cols}->{$col})
+            || ($tbl_meta{$tbl}->{pivot} && $col eq 'name'));
+
+      my ( $sub, $err ) = compile_filter( "defined \$set->{$col} && \$set->{$col} =~ m/$text/" );
+      return if !$sub || $err;
+      my $name = "quick_$tbl.$col";
+      $filters{$name} = {
+         func  => $sub,
+         text  => $text,
+         user  => 1,
+         quick => 1,
+         name  => $name,
+         note  => 'Quick-filter',
+         tbls  => [$tbl],
+      };
+      push @{$tbl_meta{$tbl}->{filters}}, $name;
+   }
+}
+
+# clear_quick_filters {{{3
+sub clear_quick_filters {
+   my $tbl = choose_visible_table(
+      # Only tables that have quick-filters
+      sub {
+         my ( $tbl ) = @_;
+         return scalar grep { $filters{$_}->{quick} } @{ $tbl_meta{$tbl}->{filters} };
+      }
+   );
+   if ( $tbl && exists($tbl_meta{$tbl}) ) {
+      my @current = @{$tbl_meta{$tbl}->{filters}};
+      @current = grep { !$filters{$_}->{quick} } @current;
+      $tbl_meta{$tbl}->{filters} = \@current;
+   }
+}
+
+sub edit_plugins {
+   $clear_screen_sub->();
+
+   my @cols = ('', qw(class desc active));
+   my $info = { map { $_ => { hdr => $_, just => '-', } }  @cols };
+   my @rows = map { $plugins{$_} } sort keys %plugins;
+   my $key;
+   my $selected;
+
+   # This loop builds a tabular view of the plugins.
+   do {
+
+      # Show help
+      if ( $key && $key eq '?' ) {
+         my @display_lines = '';
+         push @display_lines, create_caption('Editor key mappings',
+         create_table2(
+            [ sort keys %plugin_editor_action ],
+            { map { $_ => $_ } keys %plugin_editor_action },
+            { map { $_ => $plugin_editor_action{$_}->{note} } keys %plugin_editor_action },
+            { sep => '  ' }));
+         draw_screen(\@display_lines);
+         pause();
+         $key = '';
+      }
+
+      # Do the action specified
+      else {
+         $selected ||= 0;
+         if ( $key && $plugin_editor_action{$key} ) {
+            $selected = $plugin_editor_action{$key}->{func}->(\@rows, $selected);
+            $selected ||= 0;
+         }
+
+         # Build the table of plugins.
+         foreach my $row ( 0.. $#rows ) {
+            $rows[$row]->{''} = $row eq $selected ? '>' : ' ';
+         }
+         my @display_lines = create_table(\@cols, $info, \@rows);
+
+         # Highlight selected entry
+         for my $i ( 0 .. $#display_lines ) {
+            if ( $display_lines[$i] =~ m/^>/ ) {
+               $display_lines[$i] = [ $display_lines[$i], 'reverse' ];
+            }
+         }
+
+         # Draw the screen and wait for a command.
+         unshift @display_lines, '',
+            "Plugin Management.  Press ? for help, q to quit.", '';
+         draw_screen(\@display_lines);
+         $key = pause('');
+      }
+   } while ( $key ne 'q' );
+}
+
+# edit_table {{{3
+sub edit_table {
+   $clear_screen_sub->();
+   my ( $tbl ) = @_;
+   $tbl ||= choose_visible_table();
+   if ( $tbl && exists($tbl_meta{$tbl}) ) {
+      my $meta = $tbl_meta{$tbl};
+      my @cols = ('', qw(name hdr label src));
+      my $info = { map { $_ => { hdr => $_, just => '-', } }  @cols };
+      $info->{label}->{maxw} = 30;
+      my $key;
+      my $selected_column;
+
+      # This loop builds a tabular view of the tbl_meta's structure, showing each column
+      # in the entry as a row.
+      do {
+
+         # Show help
+         if ( $key && $key eq '?' ) {
+            my @display_lines = '';
+            push @display_lines, create_caption('Editor key mappings',
+            create_table2(
+               [ sort keys %tbl_editor_action ],
+               { map { $_ => $_ } keys %tbl_editor_action },
+               { map { $_ => $tbl_editor_action{$_}->{note} } keys %tbl_editor_action },
+               { sep => '  ' }));
+            draw_screen(\@display_lines);
+            pause();
+            $key = '';
+         }
+         else {
+
+            # Do the action specified
+            $selected_column ||= $meta->{visible}->[0];
+            if ( $key && $tbl_editor_action{$key} ) {
+               $selected_column = $tbl_editor_action{$key}->{func}->($tbl, $selected_column);
+               $selected_column ||= $meta->{visible}->[0];
+            }
+
+            # Build the pivoted view of the table's meta-data.  If the terminal has color,
+            # The selected row will be highlighted; otherwise a > at the left will indicate.
+            my $data = [];
+            foreach my $row ( @{$meta->{visible}} ) {
+               my %hash;
+               @hash{ @cols } = @{$meta->{cols}->{$row}}{@cols};
+               $hash{src}  = '' if ref $hash{src};
+               $hash{name} = $row;
+               $hash{''}   = $row eq $selected_column ? '>' : ' ';
+               push @$data, \%hash;
+            }
+            my @display_lines = create_table(\@cols, $info, $data);
+
+            # Highlight selected entry
+            for my $i ( 0 .. $#display_lines ) {
+               if ( $display_lines[$i] =~ m/^>/ ) {
+                  $display_lines[$i] = [ $display_lines[$i], 'reverse' ];
+               }
+            }
+
+            # Draw the screen and wait for a command.
+            unshift @display_lines, '',
+               "Editing table definition for $meta->{capt}.  Press ? for help, q to quit.", '';
+            draw_screen(\@display_lines, { clear => 1 });
+            $key = pause('');
+         }
+      } while ( $key ne 'q' );
+   }
+}
+
+# choose_mode_tables {{{3
+# Choose which table(s), and in what order, to display in a given mode.
+sub choose_mode_tables {
+   my $mode = $config{mode}->{val};
+   my @tbls = @{$modes{$mode}->{visible_tables}};
+   my $new  = prompt_list(
+      "Choose tables to display",
+      join(' ', @tbls),
+      sub { return @{$modes{$mode}->{tables}} },
+      { map { $_ => $tbl_meta{$_}->{capt} } @{$modes{$mode}->{tables}} }
+   );
+   $modes{$mode}->{visible_tables} =
+      [ unique(grep { $_ && exists $tbl_meta{$_} } split(/\s+/, $new)) ];
+   $modes{$mode}->{cust}->{visible_tables} = 1;
+}
+
+# choose_visible_table {{{3
+sub choose_visible_table {
+   my ( $grep_cond ) = @_;
+   my $mode = $config{mode}->{val};
+   my @tbls
+      = grep { $grep_cond ? $grep_cond->($_) : 1 }
+        @{$modes{$mode}->{visible_tables}};
+   my $tbl = $tbls[0];
+   if ( @tbls > 1 ) {
+      $tbl = prompt_list(
+         "Choose a table",
+         '',
+         sub { return @tbls },
+         { map { $_ => $tbl_meta{$_}->{capt} } @tbls }
+      );
+   }
+   return $tbl;
+}
+
+sub toggle_aggregate {
+   my ( $tbl ) = @_;
+   $tbl ||= choose_visible_table();
+   return unless $tbl && exists $tbl_meta{$tbl};
+   my $meta = $tbl_meta{$tbl};
+   $meta->{aggregate} ^= 1;
+}
+
+sub choose_filters {
+   my ( $tbl ) = @_;
+   $tbl ||= choose_visible_table();
+   return unless $tbl && exists $tbl_meta{$tbl};
+   my $meta = $tbl_meta{$tbl};
+   $clear_screen_sub->();
+
+   print "Choose filters for $meta->{capt}:\n";
+
+   my $ini = join(' ', @{$meta->{filters}});
+   my $val = prompt_list(
+      'Choose filters',
+      $ini,
+      sub { return keys %filters },
+      {
+         map  { $_ => $filters{$_}->{note} }
+         grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} }
+         keys %filters
+      }
+   );
+
+   my @choices = unique(split(/\s+/, $val));
+   foreach my $new ( grep { !exists($filters{$_}) } @choices ) {
+      my $answer = prompt("There is no filter called '$new'.  Create it?", undef, 'y');
+      if ( $answer eq 'y' ) {
+         create_new_filter($new, $tbl);
+      }
+   }
+   @choices = grep { exists $filters{$_} } @choices;
+   @choices = grep { grep { $tbl eq $_ } @{$filters{$_}->{tbls}} } @choices;
+   $meta->{filters} = [ @choices ];
+   $meta->{cust}->{filters} = 1;
+}
+
+sub choose_group_cols {
+   my ( $tbl ) = @_;
+   $tbl ||= choose_visible_table();
+   return unless $tbl && exists $tbl_meta{$tbl};
+   $clear_screen_sub->();
+   my $meta = $tbl_meta{$tbl};
+   my $curr = join(', ', @{$meta->{group_by}});
+   my $val = prompt_list(
+      'Group-by columns',
+      $curr,
+      sub { return keys %{$meta->{cols}} },
+      { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} });
+   if ( $curr ne $val ) {
+      $meta->{group_by} = [ grep { exists $meta->{cols}->{$_} } $val =~ m/(\w+)/g ];
+      $meta->{cust}->{group_by} = 1;
+   }
+}
+
+sub choose_sort_cols {
+   my ( $tbl ) = @_;
+   $tbl ||= choose_visible_table();
+   return unless $tbl && exists $tbl_meta{$tbl};
+   $clear_screen_sub->();
+   my $meta = $tbl_meta{$tbl};
+
+   my ( $cols, $hints );
+   if ( $meta->{pivot} ) {
+      $cols  = sub { qw(name set_0) };
+      $hints = { name => 'name', set_0 => 'set_0' };
+   }
+   else {
+      $cols  = sub { return keys %{$meta->{cols}} };
+      $hints = { map { $_ => $meta->{cols}->{$_}->{label} } keys %{$meta->{cols}} };
+   }
+
+   my $val = prompt_list(
+      'Sort columns (reverse sort with -col)',
+      $meta->{sort_cols},
+      $cols,
+      $hints );
+   if ( $meta->{sort_cols} ne $val ) {
+      $meta->{sort_cols} = $val;
+      $meta->{cust}->{sort_cols} = 1;
+      $tbl_meta{$tbl}->{sort_func} = make_sort_func($tbl_meta{$tbl});
+   }
+}
+
+# create_new_filter {{{3
+sub create_new_filter {
+   my ( $filter, $tbl ) = @_;
+   $clear_screen_sub->();
+
+   if ( !$filter || $filter =~ m/\W/ ) {
+      print word_wrap("Choose a name for the filter.  This name is not displayed, and is only used "
+            . "for internal reference.  It can only contain lowercase letters, numbers, and underscores.");
+      print "\n\n";
+      do {
+         $filter = prompt("Enter filter name");
+      } while ( !$filter || $filter =~ m/\W/ );
+   }
+
+   my $completion = sub { keys %{$tbl_meta{$tbl}->{cols}} };
+   my ( $err, $sub, $body );
+   do {
+      $clear_screen_sub->();
+      print word_wrap("A filter is a Perl subroutine that accepts a hashref of columns "
+         . "called \$set, and returns a true value if the filter accepts the row.  Example:\n"
+         . "   \$set->{active_secs} > 5\n"
+         . "will only allow rows if their active_secs column is greater than 5.");
+      print "\n\n";
+      if ( $err ) {
+         print "There's an error in your filter expression: $err\n\n";
+      }
+      $body = prompt("Enter subroutine body", undef, undef, $completion);
+      ( $sub, $err ) = compile_filter($body);
+   } while ( $err );
+
+   $filters{$filter} = {
+      func => $sub,
+      text => $body,
+      user => 1,
+      name => $filter,
+      note => 'User-defined filter',
+      tbls => [$tbl],
+   };
+}
+
+# get_config_interactive {{{3
+sub get_config_interactive {
+   my $key = shift;
+   $clear_screen_sub->();
+
+   # Print help first.
+   print "Enter a new value for '$key' ($config{$key}->{note}).\n";
+
+   my $current = ref($config{$key}->{val}) ? join(" ", @{$config{$key}->{val}}) : $config{$key}->{val};
+
+   my $new_value = prompt('Enter a value', $config{$key}->{pat}, $current);
+   $config{$key}->{val} = $new_value;
+}
+
+sub edit_current_var_set {
+   my $mode = $config{mode}->{val};
+   my $name = $config{"${mode}_set"}->{val};
+   my $variables = $var_sets{$name}->{text};
+
+   my $new = $variables;
+   do {
+      $clear_screen_sub->();
+      $new = prompt("Enter variables for $name", undef, $variables);
+   } until ( $new );
+
+   if ( $new ne $variables ) {
+      @{$var_sets{$name}}{qw(text user)} = ( $new, 1);
+   }
+}
+
+
+sub choose_var_set {
+   my ( $key ) = @_;
+   $clear_screen_sub->();
+
+   my $new_value = prompt_list(
+      'Choose a set of values to display, or enter the name of a new one',
+      $config{$key}->{val},
+      sub { return keys %var_sets },
+      { map { $_ => $var_sets{$_}->{text} } keys %var_sets });
+
+   if ( !exists $var_sets{$new_value} ) {
+      add_new_var_set($new_value);
+   }
+
+   $config{$key}->{val} = $new_value if exists $var_sets{$new_value};
+}
+
+sub switch_var_set {
+   my ( $cfg_var, $dir ) = @_;
+   my @var_sets = sort keys %var_sets;
+   my $cur      = $config{$cfg_var}->{val};
+   my $pos      = grep { $_ lt $cur } @var_sets;
+   my $newpos   = ($pos + $dir) % @var_sets;
+   $config{$cfg_var}->{val} = $var_sets[$newpos];
+   $clear_screen_sub->();
+}
+
+# Online configuration and prompting functions {{{2
+
+# edit_stmt_sleep_times {{{3
+sub edit_stmt_sleep_times {
+   $clear_screen_sub->();
+   my $stmt = prompt_list('Specify a statement', '', sub { return sort keys %stmt_maker_for });
+   return unless $stmt && exists $stmt_maker_for{$stmt};
+   $clear_screen_sub->();
+   my $curr_val = $stmt_sleep_time_for{$stmt} || 0;
+   my $new_val  = prompt('Specify a sleep delay after calling this SQL', $num_regex, $curr_val);
+   if ( $new_val ) {
+      $stmt_sleep_time_for{$stmt} = $new_val;
+   }
+   else {
+      delete $stmt_sleep_time_for{$stmt};
+   }
+}
+
+# edit_server_groups {{{3
+# Choose which server connections are in a server group.  First choose a group,
+# then choose which connections are in it.
+sub edit_server_groups {
+   $clear_screen_sub->();
+   my $mode  = $config{mode}->{val};
+   my $group = $modes{$mode}->{server_group};
+   my %curr  = %server_groups;
+   my $new   = choose_or_create_server_group($group, 'to edit');
+   $clear_screen_sub->();
+   if ( exists $curr{$new} ) {
+      # Don't do this step if the user just created a new server group,
+      # because part of that process was to choose connections.
+      my $cxns  = join(' ', @{$server_groups{$new}});
+      my @conns = choose_or_create_connection($cxns, 'for this group');
+      $server_groups{$new} = \@conns;
+   }
+}
+
+# choose_server_groups {{{3
+sub choose_server_groups {
+   $clear_screen_sub->();
+   my $mode  = $config{mode}->{val};
+   my $group = $modes{$mode}->{server_group};
+   my $new   = choose_or_create_server_group($group, 'for this mode');
+   $modes{$mode}->{server_group} = $new if exists $server_groups{$new};
+}
+
+sub choose_or_create_server_group {
+   my ( $group, $prompt ) = @_;
+   my $new   = '';
+
+   my @available = sort keys %server_groups;
+
+   if ( @available ) {
+      print "You can enter the name of a new group to create it.\n";
+
+      $new = prompt_list(
+         "Choose a server group $prompt",
+         $group,
+         sub { return @available },
+         { map { $_ => join(' ', @{$server_groups{$_}}) } @available });
+
+      $new =~ s/\s.*//;
+
+      if ( !exists $server_groups{$new} ) {
+         my $answer = prompt("There is no server group called '$new'.  Create it?", undef, "y");
+         if ( $answer eq 'y' ) {
+            add_new_server_group($new);
+         }
+      }
+   }
+   else {
+      $new = add_new_server_group();
+   }
+   return $new;
+}
+
+sub choose_or_create_connection {
+   my ( $cxns, $prompt ) = @_;
+   print "You can enter the name of a new connection to create it.\n";
+
+   my @available = sort keys %connections;
+   my $new_cxns = prompt_list(
+      "Choose connections $prompt",
+      $cxns,
+      sub { return @available },
+      { map { $_ => $connections{$_}->{dsn} } @available });
+
+   my @new = unique(grep { !exists $connections{$_} } split(/\s+/, $new_cxns));
+   foreach my $new ( @new ) {
+      my $answer = prompt("There is no connection called '$new'.  Create it?", undef, "y");
+      if ( $answer eq 'y' ) {
+         add_new_dsn($new);
+      }
+   }
+
+   return unique(grep { exists $connections{$_} } split(/\s+/, $new_cxns));
+}
+
+# choose_servers {{{3
+sub choose_servers {
+   $clear_screen_sub->();
+   my $mode = $config{mode}->{val};
+   my $cxns = join(' ', get_connections());
+   my @chosen = choose_or_create_connection($cxns, 'for this mode');
+   $modes{$mode}->{connections} = \@chosen;
+   $modes{$mode}->{server_group} = ''; # Clear this because it overrides {connections}
+}
+
+# display_license {{{3
+sub display_license {
+   $clear_screen_sub->();
+
+   print $innotop_license;
+
+   pause();
+}
+
+# Data-retrieval functions {{{2
+# get_status_info {{{3
+# Get SHOW STATUS and SHOW VARIABLES together.
+sub get_status_info {
+   my @cxns = @_;
+   if ( !$info_gotten{status}++ ) {
+      foreach my $cxn ( @cxns ) {
+         $vars{$cxn}->{$clock} ||= {};
+         my $vars = $vars{$cxn}->{$clock};
+
+         my $sth = do_stmt($cxn, 'SHOW_STATUS') or next;
+         my $res = $sth->fetchall_arrayref();
+         map { $vars->{$_->[0]} = $_->[1] || 0 } @$res;
+
+         # Calculate hi-res uptime and add cxn to the hash.  This duplicates get_driver_status,
+         # but it's most important to have consistency.
+         $vars->{Uptime_hires} ||= get_uptime($cxn);
+         $vars->{cxn} = $cxn;
+
+         # Add SHOW VARIABLES to the hash
+         $sth = do_stmt($cxn, 'SHOW_VARIABLES') or next;
+         $res = $sth->fetchall_arrayref();
+         map { $vars->{$_->[0]} = $_->[1] || 0 } @$res;
+      }
+   }
+}
+
+# Chooses a thread for explaining, killing, etc...
+# First arg is a func that can be called in grep.
+sub choose_thread {
+   my ( $grep_cond, $prompt ) = @_;
+
+   # Narrow the list to queries that can be explained.
+   my %thread_for = map {
+      # Eliminate innotop's own threads.
+      $_ => $dbhs{$_}->{dbh} ? $dbhs{$_}->{dbh}->{mysql_thread_id} : 0
+   } keys %connections;
+
+   my @candidates = grep {
+      $_->{id} != $thread_for{$_->{cxn}} && $grep_cond->($_)
+   } @current_queries;
+   return unless @candidates;
+
+   # Find out which server.
+   my @cxns = unique map { $_->{cxn} } @candidates;
+   my ( $cxn ) = select_cxn('On which server', @cxns);
+   return unless $cxn && exists($connections{$cxn});
+
+   # Re-filter the list of candidates to only those on this server
+   @candidates = grep { $_->{cxn} eq $cxn } @candidates;
+
+   # Find out which thread to do.
+   my $info;
+   if ( @candidates > 1 ) {
+
+      # Sort longest-active first, then longest-idle.
+      my $sort_func = sub {
+         my ( $a, $b ) = @_;
+         return  $a->{query} && !$b->{query} ? 1
+               : $b->{query} && !$a->{query} ? -1
+               : ($a->{time} || 0) <=> ($b->{time} || 0);
+      };
+      my @threads = map { $_->{id} } reverse sort { $sort_func->($a, $b) } @candidates;
+
+      print "\n";
+      my $thread = prompt_list($prompt,
+         $threads[0],
+         sub { return @threads });
+      return unless $thread && $thread =~ m/$int_regex/;
+
+      # Find the info hash of that query on that server.
+      ( $info ) = grep { $thread == $_->{id} } @candidates;
+   }
+   else {
+      $info = $candidates[0];
+   }
+   return $info;
+}
+
+# analyze_query {{{3
+# Allows the user to show fulltext, explain, show optimized...
+sub analyze_query {
+   my ( $action ) = @_;
+
+   my $info = choose_thread(
+      sub { $_[0]->{query} },
+      'Select a thread to analyze',
+   );
+   return unless $info;
+
+   my %actions = (
+      e => \&display_explain,
+      f => \&show_full_query,
+      o => \&show_optimized_query,
+   );
+   do {
+      $actions{$action}->($info);
+      print "\n";
+      $action = pause('Press e to explain, f for full query, o for optimized query');
+   } while ( exists($actions{$action}) );
+}
+
+# inc {{{3
+# Returns the difference between two sets of variables/status/innodb stuff.
+sub inc {
+   my ( $offset, $cxn ) = @_;
+   my $vars = $vars{$cxn};
+   if ( $offset < 0 ) {
+      return $vars->{$clock};
+   }
+   elsif ( exists $vars{$clock - $offset} && !exists $vars->{$clock - $offset - 1} ) {
+      return $vars->{$clock - $offset};
+   }
+   my $cur = $vars->{$clock - $offset};
+   my $pre = $vars->{$clock - $offset - 1};
+   return {
+      # Numeric variables get subtracted, non-numeric get passed straight through.
+      map  {
+         $_ =>
+            ( (defined $cur->{$_} && $cur->{$_} =~ m/$num_regex/)
+            ?  $cur->{$_} - ($pre->{$_} || 0)
+            :  $cur->{$_} )
+      } keys %{$cur}
+   };
+}
+
+# extract_values {{{3
+# Arguments are a set of values (which may be incremental, derived from
+# current and previous), current, and previous values.
+# TODO: there are a few places that don't remember prev set so can't pass it.
+sub extract_values {
+   my ( $set, $cur, $pre, $tbl ) = @_;
+
+   # Hook in event listeners
+   foreach my $listener ( @{$event_listener_for{extract_values}} ) {
+      $listener->extract_values($set, $cur, $pre, $tbl);
+   }
+
+   my $result = {};
+   my $meta   = $tbl_meta{$tbl};
+   my $cols   = $meta->{cols};
+   foreach my $key ( keys %$cols ) {
+      my $info = $cols->{$key}
+         or die "Column '$key' doesn't exist in $tbl";
+      die "No func defined for '$key' in $tbl"
+         unless $info->{func};
+      eval {
+         $result->{$key} = $info->{func}->($set, $cur, $pre)
+      };
+      if ( $EVAL_ERROR ) {
+         if ( $config{debug}->{val} ) {
+            die $EVAL_ERROR;
+         }
+         $result->{$key} = $info->{num} ? 0 : '';
+      }
+   }
+   return $result;
+}
+
+# get_full_processlist {{{3
+sub get_full_processlist {
+   my @cxns = @_;
+   my @result;
+   foreach my $cxn ( @cxns ) {
+      my $stmt = do_stmt($cxn, 'PROCESSLIST') or next;
+      my $arr  = $stmt->fetchall_arrayref({});
+      push @result, map { $_->{cxn} = $cxn; $_ } @$arr;
+   }
+   return @result;
+}
+
+# get_open_tables {{{3
+sub get_open_tables {
+   my @cxns = @_;
+   my @result;
+   foreach my $cxn ( @cxns ) {
+      my $stmt = do_stmt($cxn, 'OPEN_TABLES') or next;
+      my $arr  = $stmt->fetchall_arrayref({});
+      push @result, map { $_->{cxn} = $cxn; $_ } @$arr;
+   }
+   return @result;
+}
+
+# get_innodb_status {{{3
+sub get_innodb_status {
+   my ( $cxns, $addl_sections ) = @_;
+   if ( !$config{skip_innodb}->{val} && !$info_gotten{innodb_status}++ ) {
+
+      # Determine which sections need to be parsed
+      my %sections_required =
+         map  { $tbl_meta{$_}->{innodb} => 1 }
+         grep { $_ && $tbl_meta{$_}->{innodb} }
+         get_visible_tables();
+
+      # Add in any other sections the caller requested.
+      foreach my $sec ( @$addl_sections ) {
+         $sections_required{$sec} = 1;
+      }
+
+      foreach my $cxn ( @$cxns ) {
+         my $innodb_status_text;
+
+         if ( $file ) { # Try to fetch status text from the file.
+            my @stat = stat($file);
+
+            # Initialize the file.
+            if ( !$file_mtime ) {
+               # Initialize to 130k from the end of the file (because the limit
+               # on the size of innodb status is 128k even with Google's patches)
+               # and try to grab the last status from the file.
+               sysseek($file, (-128 * 1_024), 2);
+            }
+
+            # Read from the file.
+            my $buffer;
+            if ( !$file_mtime || $file_mtime != $stat[9] ) {
+               $file_data = '';
+               while ( sysread($file, $buffer, 4096) ) {
+                  $file_data .= $buffer;
+               }
+               $file_mtime = $stat[9];
+            }
+
+            # Delete everything but the last InnoDB status text from the file.
+            $file_data =~ s/\A.*(?=^=====================================\n...... ........ INNODB MONITOR OUTPUT)//ms;
+            $innodb_status_text = $file_data;
+         }
+
+         else {
+            my $stmt = do_stmt($cxn, 'INNODB_STATUS') or next;
+            $innodb_status_text = $stmt->fetchrow_hashref()->{status};
+         }
+
+         next unless $innodb_status_text
+            && substr($innodb_status_text, 0, 100) =~ m/INNODB MONITOR OUTPUT/;
+
+         # Parse and merge into %vars storage
+         my %innodb_status = (
+            $innodb_parser->get_status_hash(
+               $innodb_status_text,
+               $config{debug}->{val},
+               \%sections_required,
+               0, # don't parse full lock information
+            )
+         );
+         if ( !$innodb_status{IB_got_all} && $config{auto_wipe_dl}->{val} ) {
+            clear_deadlock($cxn);
+         }
+
+         # Merge using a hash slice, which is the fastest way
+         $vars{$cxn}->{$clock} ||= {};
+         my $hash = $vars{$cxn}->{$clock};
+         @{$hash}{ keys %innodb_status } = values %innodb_status;
+         $hash->{cxn} = $cxn;
+         $hash->{Uptime_hires} ||= get_uptime($cxn);
+      }
+   }
+}
+
+# clear_deadlock {{{3
+sub clear_deadlock {
+   my ( $cxn ) = @_;
+   return if $clearing_deadlocks++;
+   my $tbl = $connections{$cxn}->{dl_table};
+   return unless $tbl;
+
+   eval {
+      # Set up the table for creating a deadlock.
+      my $engine = version_ge($dbhs{$cxn}->{dbh}, '4.1.2') ? 'engine' : 'type';
+      return unless do_query($cxn, "drop table if exists $tbl");
+      return unless do_query($cxn, "create table $tbl(a int) $engine=innodb");
+      return unless do_query($cxn, "delete from $tbl");
+      return unless do_query($cxn, "insert into $tbl(a) values(0), (1)");
+      return unless do_query($cxn, "commit"); # Or the children will block against the parent
+
+      # Fork off two children to deadlock against each other.
+      my %children;
+      foreach my $child ( 0..1 ) {
+         my $pid = fork();
+         if ( defined($pid) && $pid == 0 ) { # I am a child
+            deadlock_thread( $child, $tbl, $cxn );
+         }
+         elsif ( !defined($pid) ) {
+            die("Unable to fork for clearing deadlocks!\n");
+         }
+         # I already exited if I'm a child, so I'm the parent.
+         $children{$child} = $pid;
+      }
+
+      # Wait for the children to exit.
+      foreach my $child ( keys %children ) {
+         my $pid = waitpid($children{$child}, 0);
+      }
+
+      # Clean up.
+      do_query($cxn, "drop table $tbl");
+   };
+   if ( $EVAL_ERROR ) {
+      print $EVAL_ERROR;
+      pause();
+   }
+
+   $clearing_deadlocks = 0;
+}
+
+sub get_master_logs {
+   my @cxns = @_;
+   my @result;
+   if ( !$info_gotten{master_logs}++ ) {
+      foreach my $cxn ( @cxns ) {
+         my $stmt = do_stmt($cxn, 'SHOW_MASTER_LOGS') or next;
+         push @result, @{$stmt->fetchall_arrayref({})};
+      }
+   }
+   return @result;
+}
+
+# get_master_slave_status {{{3
+sub get_master_slave_status {
+   my @cxns = @_;
+   if ( !$info_gotten{replication_status}++ ) {
+      foreach my $cxn ( @cxns ) {
+         $vars{$cxn}->{$clock} ||= {};
+         my $vars = $vars{$cxn}->{$clock};
+         $vars->{cxn} = $cxn;
+
+         my $stmt = do_stmt($cxn, 'SHOW_MASTER_STATUS') or next;
+         my $res = $stmt->fetchall_arrayref({})->[0];
+         @{$vars}{ keys %$res } = values %$res;
+         $stmt = do_stmt($cxn, 'SHOW_SLAVE_STATUS') or next;
+         $res = $stmt->fetchall_arrayref({})->[0];
+         @{$vars}{ keys %$res } = values %$res;
+         $vars->{Uptime_hires} ||= get_uptime($cxn);
+      }
+   }
+}
+
+sub is_func {
+   my ( $word ) = @_;
+   return defined(&$word)
+      || eval "my \$x= sub { $word  }; 1"
+      || $EVAL_ERROR !~ m/^Bareword/;
+}
+
+# Documentation {{{1
+# ############################################################################
+# I put this last as per the Dog book.
+# ############################################################################
+=pod
+
+=head1 NAME
+
+innotop - MySQL and InnoDB transaction/status monitor.
+
+=head1 SYNOPSIS
+
+To monitor servers normally:
+
+ innotop
+
+To monitor InnoDB status information from a file:
+
+ innotop /var/log/mysql/mysqld.err
+
+To run innotop non-interactively in a pipe-and-filter configuration:
+
+ innotop --count 5 -d 1 -n
+
+=head1 DESCRIPTION
+
+innotop monitors MySQL servers.  Each of its modes shows you a different aspect
+of what's happening in the server.  For example, there's a mode for monitoring
+replication, one for queries, and one for transactions.  innotop refreshes its
+data periodically, so you see an updating view.
+
+innotop has lots of features for power users, but you can start and run it with
+virtually no configuration.  If you're just getting started, see
+L<"QUICK-START">.  Press '?' at any time while running innotop for
+context-sensitive help.
+
+=head1 QUICK-START
+
+To start innotop, open a terminal or command prompt.  If you have installed
+innotop on your system, you should be able to just type "innotop" and press
+Enter; otherwise, you will need to change to innotop's directory and type "perl
+innotop".
+
+The first thing innotop needs to know is how to connect to a MySQL server.  You
+can just enter the hostname of the server, for example "localhost" or
+"127.0.0.1" if the server is on the same machine as innotop.  After this innotop
+will prompt you for a DSN (data source name).  You should be able to just accept
+the defaults by pressing Enter.
+
+When innotop asks you about a table to use when resetting InnoDB deadlock
+information, just accept the default for now.  This is an advanced feature you
+can configure later (see L<"D: InnoDB Deadlocks"> for more).
+
+If you have a .my.cnf file with your MySQL connection defaults, innotop can read
+it, and you won't need to specify a username and password if it's in that file.
+Otherwise, you should answer 'y' to the next couple of prompts.
+
+After this, you should be connected, and innotop should show you something like
+the following:
+
+ InnoDB Txns (? for help) localhost, 01:11:19, InnoDB 10s :-), 50 QPS,
+ 
+ CXN        History  Versions  Undo  Dirty Buf  Used Bufs  Txns  MaxTxn
+ localhost        7      2035  0 0       0.00%     92.19%     1   07:34
+ 
+ CXN        ID     User   Host       Txn Status  Time   Undo  Query Tex
+ localhost  98379  user1  webserver  ACTIVE      07:34     0  SELECT `c
+ localhost  98450  user1  webserver  ACTIVE      01:06     0  INSERT IN
+ localhost  97750  user1  webserver  not starte  00:00     0      
+ localhost  98375  user1  appserver  not starte  00:00     0      
+
+(This sample is truncated at the right so it will fit on a terminal when running
+'man innotop')
+
+This sample comes from a quiet server with few transactions active.  If your
+server is busy, you'll see more output.  Notice the first line on the screen,
+which tells you what mode you're in and what server you're connected to.  You
+can change to other modes with keystrokes; press 'Q' to switch to a list of
+currently running queries.
+
+Press the '?' key to see what keys are active in the current mode.  You can
+press any of these keys and innotop will either take the requested action or
+prompt you for more input.  If your system has Term::ReadLine support, you can
+use TAB and other keys to auto-complete and edit input.
+
+To quit innotop, press the 'q' key.
+
+=head1 OPTIONS
+
+innotop is mostly configured via its configuration file, but some of the
+configuration options can come from the command line.  You can also specify a
+file to monitor for InnoDB status output; see L<"MONITORING A FILE"> for more
+details.
+
+You can negate some options by prefixing the option name with --no.  For
+example, --noinc (or --no-inc) negates L<"--inc">.
+
+=over
+
+=item --help
+
+Print a summary of command-line usage and exit.
+
+=item --color
+
+Enable or disable terminal coloring.  Corresponds to the L<"color"> config file
+setting.
+
+=item --config
+
+Specifies a configuration file to read.  This option is non-sticky, that is to
+say it does not persist to the configuration file itself.
+
+=item --nonint
+
+Enable non-interactive operation.  See L<"NON-INTERACTIVE OPERATION"> for more.
+
+=item --count
+
+Refresh only the specified number of times (ticks) before exiting.  Each refresh
+is a pause for L<"interval"> seconds, followed by requesting data from MySQL
+connections and printing it to the terminal.
+
+=item --delay
+
+Specifies the amount of time to pause between ticks (refreshes).  Corresponds to
+the configuration option L<"interval">.
+
+=item --mode
+
+Specifies the mode in which innotop should start.  Corresponds to the
+configuration option L<"mode">.
+
+=item --inc
+
+Specifies whether innotop should display absolute numbers or relative numbers
+(offsets from their previous values).  Corresponds to the configuration option
+L<"status_inc">.
+
+=item --version
+
+Output version information and exit.
+
+=back
+
+=head1 HOTKEYS
+
+innotop is interactive, and you control it with key-presses.
+
+=over
+
+=item *
+
+Uppercase keys switch between modes.
+
+=item *
+
+Lowercase keys initiate some action within the current mode.
+
+=item *
+
+Other keys do something special like change configuration or show the
+innotop license.
+
+=back
+
+Press '?' at any time to see the currently active keys and what they do.
+
+=head1 MODES
+
+Each of innotop's modes retrieves and displays a particular type of data from
+the servers you're monitoring.  You switch between modes with uppercase keys.
+The following is a brief description of each mode, in alphabetical order.  To
+switch to the mode, press the key listed in front of its heading in the
+following list:
+
+=over
+
+=item B: InnoDB Buffers
+
+This mode displays information about the InnoDB buffer pool, page statistics,
+insert buffer, and adaptive hash index.  The data comes from SHOW INNODB STATUS.
+
+This mode contains the L<"buffer_pool">, L<"page_statistics">,
+L<"insert_buffers">, and L<"adaptive_hash_index"> tables by default.
+
+=item C: Command Summary
+
+This mode is similar to mytop's Command Summary mode.  It shows the
+L<"cmd_summary"> table, which looks something like the following:
+
+ Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40
+ _____________________ Command Summary _____________________
+ Name                    Value    Pct     Last Incr  Pct    
+ Select_scan             3244858  69.89%          2  100.00%
+ Select_range            1354177  29.17%          0    0.00%
+ Select_full_join          39479   0.85%          0    0.00%
+ Select_full_range_join     4097   0.09%          0    0.00%
+ Select_range_check            0   0.00%          0    0.00%
+
+The command summary table is built by extracting variables from
+L<"STATUS_VARIABLES">.  The variables must be numeric and must match the prefix
+given by the L<"cmd_filter"> configuration variable.  The variables are then
+sorted by value descending and compared to the last variable, as shown above.
+The percentage columns are percentage of the total of all variables in the
+table, so you can see the relative weight of the variables.
+
+The example shows what you see if the prefix is "Select_".  The default
+prefix is "Com_".  You can choose a prefix with the 's' key.
+
+It's rather like running SHOW VARIABLES LIKE "prefix%" with memory and
+nice formatting.
+
+Values are aggregated across all servers.  The Pct columns are not correctly
+aggregated across multiple servers.  This is a known limitation of the grouping
+algorithm that may be fixed in the future.
+
+=item D: InnoDB Deadlocks
+
+This mode shows the transactions involved in the last InnoDB deadlock.  A second
+table shows the locks each transaction held and waited for.  A deadlock is
+caused by a cycle in the waits-for graph, so there should be two locks held and
+one waited for unless the deadlock information is truncated.
+
+InnoDB puts deadlock information before some other information in the SHOW
+INNODB STATUS output.  If there are a lot of locks, the deadlock information can
+grow very large, and there is a limit on the size of the SHOW INNODB
+STATUS output.  A large deadlock can fill the entire output, or even be
+truncated, and prevent you from seeing other information at all.  If you are
+running innotop in another mode, for example T mode, and suddenly you don't see
+anything, you might want to check and see if a deadlock has wiped out the data
+you need.
+
+If it has, you can create a small deadlock to replace the large one.  Use the
+'w' key to 'wipe' the large deadlock with a small one.  This will not work
+unless you have defined a deadlock table for the connection (see L<"SERVER
+CONNECTIONS">).
+
+You can also configure innotop to automatically detect when a large deadlock
+needs to be replaced with a small one (see L<"auto_wipe_dl">).
+
+This mode displays the L<"deadlock_transactions"> and L<"deadlock_locks"> tables
+by default.
+
+=item F: InnoDB Foreign Key Errors
+
+This mode shows the last InnoDB foreign key error information, such as the
+table where it happened, when and who and what query caused it, and so on.
+
+InnoDB has a huge variety of foreign key error messages, and many of them are
+just hard to parse.  innotop doesn't always do the best job here, but there's
+so much code devoted to parsing this messy, unparseable output that innotop is
+likely never to be perfect in this regard.  If innotop doesn't show you what
+you need to see, just look at the status text directly.
+
+This mode displays the L<"fk_error"> table by default.
+
+=item I: InnoDB I/O Info
+
+This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O,
+file I/O miscellaneous, and log statistics.  It displays the L<"io_threads">,
+L<"pending_io">, L<"file_io_misc">, and L<"log_statistics"> tables by default.
+
+=item L: Locks
+
+This mode shows information about current locks.  At the moment only InnoDB
+locks are supported, and by default you'll only see locks for which transactions
+are waiting.  This information comes from the TRANSACTIONS section of the InnoDB
+status text.  If you have a very busy server, you may have frequent lock waits;
+it helps to be able to see which tables and indexes are the "hot spot" for
+locks.  If your server is running pretty well, this mode should show nothing.
+
+You can configure MySQL and innotop to monitor not only locks for which a
+transaction is waiting, but those currently held, too.  You can do this with the
+InnoDB Lock Monitor (L<http://dev.mysql.com/doc/en/innodb-monitor.html>).  It's
+not documented in the MySQL manual, but creating the lock monitor with the
+following statement also affects the output of SHOW INNODB STATUS, which innotop
+uses:
+
+  CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB;
+
+This causes InnoDB to print its output to the MySQL file every 16 seconds or so,
+as stated in the manual, but it also makes the normal SHOW INNODB STATUS output
+include lock information, which innotop can parse and display (that's the
+undocumented feature).
+
+This means you can do what may have seemed impossible: to a limited extent
+(InnoDB truncates some information in the output), you can see which transaction
+holds the locks something else is waiting for.  You can also enable and disable
+the InnoDB Lock Monitor with the key mappings in this mode.
+
+This mode displays the L<"innodb_locks"> table by default.  Here's a sample of
+the screen when one connection is waiting for locks another connection holds:
+
+ _________________________________ InnoDB Locks __________________________
+ CXN        ID  Type    Waiting  Wait   Active  Mode  DB    Table  Index
+ localhost  12  RECORD        1  00:10   00:10  X     test  t1     PRIMARY
+ localhost  12  TABLE         0  00:10   00:10  IX    test  t1
+ localhost  12  RECORD        1  00:10   00:10  X     test  t1     PRIMARY
+ localhost  11  TABLE         0  00:00   00:25  IX    test  t1
+ localhost  11  RECORD        0  00:00   00:25  X     test  t1     PRIMARY
+
+You can see the first connection, ID 12, is waiting for a lock on the PRIMARY
+key on test.t1, and has been waiting for 10 seconds.  The second connection
+isn't waiting, because the Waiting column is 0, but it holds locks on the same
+index.  That tells you connection 11 is blocking connection 12.
+
+=item M: Master/Slave Replication Status
+
+This mode shows the output of SHOW SLAVE STATUS and SHOW MASTER STATUS in three
+tables.  The first two divide the slave's status into SQL and I/O thread status,
+and the last shows master status.  Filters are applied to eliminate non-slave
+servers from the slave tables, and non-master servers from the master table.
+
+This mode displays the L<"slave_sql_status">, L<"slave_io_status">, and
+L<"master_status"> tables by default.
+
+=item O: Open Tables
+
+This section comes from MySQL's SHOW OPEN TABLES command.  By default it is
+filtered to show tables which are in use by one or more queries, so you can
+get a quick look at which tables are 'hot'.  You can use this to guess which
+tables might be locked implicitly.
+
+This mode displays the L<"open_tables"> mode by default.
+
+=item Q: Query List
+
+This mode displays the output from SHOW FULL PROCESSLIST, much like B<mytop>'s
+query list mode.  This mode does B<not> show InnoDB-related information.  This
+is probably one of the most useful modes for general usage.
+
+There is an informative header that shows general status information about
+your server.  You can toggle it on and off with the 'h' key.  By default,
+innotop hides inactive processes and its own process.  You can toggle these on
+and off with the 'i' and 'a' keys.
+
+You can EXPLAIN a query from this mode with the 'e' key.  This displays the
+query's full text, the results of EXPLAIN, and in newer MySQL versions, even
+the optimized query resulting from EXPLAIN EXTENDED.  innotop also tries to
+rewrite certain queries to make them EXPLAIN-able.  For example, INSERT/SELECT
+statements are rewritable.
+
+This mode displays the L<"q_header"> and L<"processlist"> tables by default.
+
+=item R: InnoDB Row Operations and Semaphores
+
+This mode shows InnoDB row operations, row operation miscellaneous, semaphores,
+and information from the wait array.  It displays the L<"row_operations">,
+L<"row_operation_misc">, L<"semaphores">, and L<"wait_array"> tables by default.
+
+=item S: Variables & Status
+
+This mode calculates statistics, such as queries per second, and prints them out
+in several different styles.  You can show absolute values, or incremental values
+between ticks.
+
+You can switch between the views by pressing a key.  The 's' key prints a
+single line each time the screen updates, in the style of B<vmstat>.  The 'g'
+key changes the view to a graph of the same numbers, sort of like B<tload>.
+The 'v' key changes the view to a pivoted table of variable names on the left,
+with successive updates scrolling across the screen from left to right.  You can
+choose how many updates to put on the screen with the L<"num_status_sets">
+configuration variable.
+
+Headers may be abbreviated to fit on the screen in interactive operation.  You
+choose which variables to display with the 'c' key, which selects from
+predefined sets, or lets you create your own sets.  You can edit the current set
+with the 'e' key.
+
+This mode doesn't really display any tables like other modes.  Instead, it uses
+a table definition to extract and format the data, but it then transforms the
+result in special ways before outputting it.  It uses the L<"var_status"> table
+definition for this.
+
+=item T: InnoDB Transactions
+
+This mode shows transactions from the InnoDB monitor's output, in B<top>-like
+format.  This mode is the reason I wrote innotop.
+
+You can kill queries or processes with the 'k' and 'x' keys, and EXPLAIN a query
+with the 'e' or 'f' keys.  InnoDB doesn't print the full query in transactions,
+so explaining may not work right if the query is truncated.
+
+The informational header can be toggled on and off with the 'h' key.  By
+default, innotop hides inactive transactions and its own transaction.  You can
+toggle this on and off with the 'i' and 'a' keys.
+
+This mode displays the L<"t_header"> and L<"innodb_transactions"> tables by
+default.
+
+=back
+
+=head1 INNOTOP STATUS
+
+The first line innotop displays is a "status bar" of sorts.  What it contains
+depends on the mode you're in, and what servers you're monitoring.  The first
+few words are always the innotop mode, such as "InnoDB Txns" for T mode,
+followed by a reminder to press '?' for help at any time.
+
+=head2 ONE SERVER
+
+The simplest case is when you're monitoring a single server.  In this case, the
+name of the connection is next on the status line.  This is the name you gave
+when you created the connection -- most likely the MySQL server's hostname.
+This is followed by the server's uptime.
+
+If you're in an InnoDB mode, such as T or B, the next word is "InnoDB" followed
+by some information about the SHOW INNODB STATUS output used to render the
+screen.  The first word is the number of seconds since the last SHOW INNODB
+STATUS, which InnoDB uses to calculate some per-second statistics.  The next is
+a smiley face indicating whether the InnoDB output is truncated.  If the smiley
+face is a :-), all is well; there is no truncation.  A :^| means the transaction
+list is so long, InnoDB has only printed out some of the transactions.  Finally,
+a frown :-( means the output is incomplete, which is probably due to a deadlock
+printing too much lock information (see L<"D: InnoDB Deadlocks">).
+
+The next two words indicate the server's queries per second (QPS) and how many
+threads (connections) exist.  Finally, the server's version number is the last
+thing on the line.
+
+=head2 MULTIPLE SERVERS
+
+If you are monitoring multiple servers (see L<"SERVER CONNECTIONS">), the status
+line does not show any details about individual servers.  Instead, it shows the
+names of the connections that are active.  Again, these are connection names you
+specified, which are likely to be the server's hostname.  A connection that has
+an error is prefixed with an exclamation point.
+
+If you are monitoring a group of servers (see L<"SERVER GROUPS">), the status
+line shows the name of the group.  If any connection in the group has an
+error, the group's name is followed by the fraction of the connections that
+don't have errors.
+
+See L<"ERROR HANDLING"> for more details about innotop's error handling.
+
+=head2 MONITORING A FILE
+
+If you give a filename on the command line, innotop will not connect to ANY
+servers at all.  It will watch the specified file for InnoDB status output and
+use that as its data source.  It will always show a single connection called
+'file'.  And since it can't connect to a server, it can't determine how long the
+server it's monitoring has been up; so it calculates the server's uptime as time
+since innotop started running.
+
+=head1 SERVER ADMINISTRATION
+
+While innotop is primarily a monitor that lets you watch and analyze your
+servers, it can also send commands to servers.  The most frequently useful
+commands are killing queries and stopping or starting slaves.
+
+You can kill a connection, or in newer versions of MySQL kill a query but not a
+connection, from L<"Q: Query List"> and L<"T: InnoDB Transactions"> modes.
+Press 'k' to issue a KILL command, or 'x' to issue a KILL QUERY command.
+innotop will prompt you for the server and/or connection ID to kill (innotop
+does not prompt you if there is only one possible choice for any input).
+innotop pre-selects the longest-running query, or the oldest connection.
+Confirm the command with 'y'.
+
+In L<"M: Master/Slave Replication Status"> mode, you can start and stop slaves
+with the 'a' and 'o' keys, respectively.  You can send these commands to many
+slaves at once.  innotop fills in a default command of START SLAVE or STOP SLAVE
+for you, but you can actually edit the command and send anything you wish, such
+as SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event
+when it starts.
+
+You can also ask innotop to calculate the earliest binlog in use by any slave
+and issue a PURGE MASTER LOGS on the master.  Use the 'b' key for this.  innotop
+will prompt you for a master to run the command on, then prompt you for the
+connection names of that master's slaves (there is no way for innotop to
+determine this reliably itself).  innotop will find the minimum binlog in use by
+these slave connections and suggest it as the argument to PURGE MASTER LOGS.
+
+=head1 SERVER CONNECTIONS
+
+When you create a server connection, innotop asks you for a series of inputs, as
+follows:
+
+=over
+
+=item DSN
+
+A DSN is a Data Source Name, which is the initial argument passed to the DBI
+module for connecting to a server.  It is usually of the form
+
+ DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME
+
+Since this DSN is passed to the DBD::mysql driver, you should read the driver's
+documentation at L<"http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"> for
+the exact details on all the options you can pass the driver in the DSN.  You
+can read more about DBI at L<http://dbi.perl.org/docs/>, and especially at
+L<http://search.cpan.org/~timb/DBI/DBI.pm>.
+
+The mysql_read_default_group=mysql option lets the DBD driver read your MySQL
+options files, such as ~/.my.cnf on UNIX-ish systems.  You can use this to avoid
+specifying a username or password for the connection.
+
+=item InnoDB Deadlock Table
+
+This optional item tells innotop a table name it can use to deliberately create
+a small deadlock (see L<"D: InnoDB Deadlocks">).  If you specify this option,
+you just need to be sure the table doesn't exist, and that innotop can create
+and drop the table with the InnoDB storage engine.  You can safely omit or just
+accept the default if you don't intend to use this.
+
+=item Username
+
+innotop will ask you if you want to specify a username.  If you say 'y', it will
+then prompt you for a user name.  If you have a MySQL option file that specifies
+your username, you don't have to specify a username.
+
+The username defaults to your login name on the system you're running innotop on.
+
+=item Password
+
+innotop will ask you if you want to specify a password.  Like the username, the
+password is optional, but there's an additional prompt that asks if you want to
+save the password in the innotop configuration file.  If you don't save it in
+the configuration file, innotop will prompt you for a password each time it
+starts.  Passwords in the innotop configuration file are saved in plain text,
+not encrypted in any way.
+
+=back
+
+Once you finish answering these questions, you should be connected to a server.
+But innotop isn't limited to monitoring a single server; you can define many
+server connections and switch between them by pressing the '@' key.  See
+L<"SWITCHING BETWEEN CONNECTIONS">.
+
+To create a new connection, press the '@' key and type the name of the new
+connection, then follow the steps given above.
+
+=head1 SERVER GROUPS
+
+If you have multiple MySQL instances, you can put them into named groups, such
+as 'all', 'masters', and 'slaves', which innotop can monitor all together.
+
+You can choose which group to monitor with the '#' key, and you can press the
+TAB key to switch to the next group.  If you're not currently monitoring a
+group, pressing TAB selects the first group.
+
+To create a group, press the '#' key and type the name of your new group, then
+type the names of the connections you want the group to contain.
+
+=head1 SWITCHING BETWEEN CONNECTIONS
+
+innotop lets you quickly switch which servers you're monitoring.  The most basic
+way is by pressing the '@' key and typing the name(s) of the connection(s) you
+want to use.  This setting is per-mode, so you can monitor different connections
+in each mode, and innotop remembers which connections you choose.
+
+You can quickly switch to the 'next' connection in alphabetical order with the
+'n' key.  If you're monitoring a server group (see L<"SERVER GROUPS">) this will
+switch to the first connection.
+
+You can also type many connection names, and innotop will fetch and display data
+from them all.  Just separate the connection names with spaces, for example
+"server1 server2."  Again, if you type the name of a connection that doesn't
+exist, innotop will prompt you for connection information and create the
+connection.
+
+Another way to monitor multiple connections at once is with server groups.  You
+can use the TAB key to switch to the 'next' group in alphabetical order, or if
+you're not monitoring any groups, TAB will switch to the first group.
+
+innotop does not fetch data in parallel from connections, so if you are
+monitoring a large group or many connections, you may notice increased delay
+between ticks.
+
+When you monitor more than one connection, innotop's status bar changes.  See
+L<"INNOTOP STATUS">.
+
+=head1 ERROR HANDLING
+
+Error handling is not that important when monitoring a single connection, but is
+crucial when you have many active connections.  A crashed server or lost
+connection should not crash innotop.  As a result, innotop will continue to run
+even when there is an error; it just won't display any information from the
+connection that had an error.  Because of this, innotop's behavior might confuse
+you.  It's a feature, not a bug!
+
+innotop does not continue to query connections that have errors, because they
+may slow innotop and make it hard to use, especially if the error is a problem
+connecting and causes a long time-out.  Instead, innotop retries the connection
+occasionally to see if the error still exists.  If so, it will wait until some
+point in the future.  The wait time increases in ticks as the Fibonacci series,
+so it tries less frequently as time passes.
+
+Since errors might only happen in certain modes because of the SQL commands
+issued in those modes, innotop keeps track of which mode caused the error.  If
+you switch to a different mode, innotop will retry the connection instead of
+waiting.
+
+By default innotop will display the problem in red text at the bottom of the
+first table on the screen.  You can disable this behavior with the
+L<"show_cxn_errors_in_tbl"> configuration option, which is enabled by default.
+If the L<"debug"> option is enabled, innotop will display the error at the
+bottom of every table, not just the first.  And if L<"show_cxn_errors"> is
+enabled, innotop will print the error text to STDOUT as well.  Error messages
+might only display in the mode that caused the error, depending on the mode and
+whether innotop is avoiding querying that connection.
+
+=head1 NON-INTERACTIVE OPERATION
+
+You can run innotop in non-interactive mode, in which case it is entirely
+controlled from the configuration file and command-line options.  To start
+innotop in non-interactive mode, give the L"<--nonint"> command-line option.
+This changes innotop's behavior in the following ways:
+
+=over
+
+=item *
+
+Certain Perl modules are not loaded.  Term::Readline is not loaded, since
+innotop doesn't prompt interactively.  Term::ANSIColor and Win32::Console::ANSI
+modules are not loaded.  Term::ReadKey is still used, since innotop may have to
+prompt for connection passwords when starting up.
+
+=item *
+
+innotop does not clear the screen after each tick.
+
+=item *
+
+innotop does not persist any changes to the configuration file.
+
+=item *
+
+If L<"--count"> is given and innotop is in incremental mode (see L<"status_inc">
+and L<"--inc">), innotop actually refreshes one more time than specified so it
+can print incremental statistics.  This suppresses output during the first
+tick, so innotop may appear to hang.
+
+=item *
+
+innotop only displays the first table in each mode.  This is so the output can
+be easily processed with other command-line utilities such as awk and sed.  To
+change which tables display in each mode, see L<"TABLES">.  Since L<"Q: Query
+List"> mode is so important, innotop automatically disables the L<"q_header">
+table.  This ensures you'll see the L<"processlist"> table, even if you have
+innotop configured to show the q_header table during interactive operation.
+Similarly, in L<"T: InnoDB Transactions"> mode, the L<"t_header"> table is
+suppressed so you see only the L<"innodb_transactions"> table.
+
+=item *
+
+All output is tab-separated instead of being column-aligned with whitespace, and
+innotop prints the full contents of each table instead of only printing one
+screenful at a time.
+
+=item *
+
+innotop only prints column headers once instead of every tick (see
+L<"hide_hdr">).  innotop does not print table captions (see
+L<"display_table_captions">).  innotop ensures there are no empty lines in the
+output.
+
+=item *
+
+innotop does not honor the L<"shorten"> transformation, which normally shortens
+some numbers to human-readable formats.
+
+=item *
+
+innotop does not print a status line (see L<"INNOTOP STATUS">).
+
+=back
+
+=head1 CONFIGURING
+
+Nearly everything about innotop is configurable.  Most things are possible to
+change with built-in commands, but you can also edit the configuration file.
+
+While running innotop, press the '$' key to bring up the configuration editing
+dialog.  Press another key to select the type of data you want to edit:
+
+=over
+
+=item S: Statement Sleep Times
+
+Edits SQL statement sleep delays, which make innotop pause for the specified
+amount of time after executing a statement.  See L<"SQL STATEMENTS"> for a
+definition of each statement and what it does.  By default innotop does not
+delay after any statements.
+
+This feature is included so you can customize the side-effects caused by
+monitoring your server.  You may not see any effects, but some innotop users
+have noticed that certain MySQL versions under very high load with InnoDB
+enabled take longer than usual to execute SHOW GLOBAL STATUS.  If innotop calls
+SHOW FULL PROCESSLIST immediately afterward, the processlist contains more
+queries than the machine actually averages at any given moment.  Configuring
+innotop to pause briefly after calling SHOW GLOBAL STATUS alleviates this
+effect.
+
+Sleep times are stored in the L<"stmt_sleep_times"> section of the configuration
+file.  Fractional-second sleeps are supported, subject to your hardware's
+limitations.
+
+=item c: Edit Columns
+
+Starts the table editor on one of the displayed tables.  See L<"TABLE EDITOR">.
+An alternative way to start the table editor without entering the configuration
+dialog is with the '^' key.
+
+=item g: General Configuration
+
+Starts the configuration editor to edit global and mode-specific configuration
+variables (see L<"MODES">).  innotop prompts you to choose a variable from among
+the global and mode-specific ones depending on the current mode.
+
+=item k: Row-Coloring Rules
+
+Starts the row-coloring rules editor on one of the displayed table(s).  See
+L<"COLORS"> for details.
+
+=item p: Manage Plugins
+
+Starts the plugin configuration editor.  See L<"PLUGINS"> for details.
+
+=item s: Server Groups
+
+Lets you create and edit server groups.  See L<"SERVER GROUPS">.
+
+=item t: Choose Displayed Tables
+
+Lets you choose which tables to display in this mode.  See L<"MODES"> and
+L<"TABLES">.
+
+=back
+
+=head1 CONFIGURATION FILE
+
+innotop's default configuration file location is in $HOME/.innotop, but can be
+overridden with the L<"--config"> command-line option.  You can edit it by hand
+safely.  innotop reads the configuration file when it starts, and writes it out
+again when it exits, so any changes you make while innotop is running will be
+lost.
+
+innotop doesn't store its entire configuration in the configuration file.  It
+has a huge set of default configuration that it holds only in memory, and the
+configuration file only overrides these defaults.  When you customize a default
+setting, innotop notices, and then stores the customizations into the file.
+This keeps the file size down, makes it easier to edit, and makes upgrades
+easier.
+
+A configuration file can be made read-only.  See L<"readonly">.
+
+The configuration file is arranged into sections like an INI file.  Each
+section begins with [section-name] and ends with [/section-name].  Each
+section's entries have a different syntax depending on the data they need to
+store.  You can put comments in the file; any line that begins with a #
+character is a comment.  innotop will not read the comments, so it won't write
+them back out to the file when it exits.  Comments in read-only configuration
+files are still useful, though.
+
+The first line in the file is innotop's version number.  This lets innotop
+notice when the file format is not backwards-compatible, and upgrade smoothly
+without destroying your customized configuration.
+
+The following list describes each section of the configuration file and the data
+it contains:
+
+=over
+
+=item general
+
+The 'general' section contains global configuration variables and variables that
+may be mode-specific, but don't belong in any other section.  The syntax is a
+simple key=value list.  innotop writes a comment above each value to help you
+edit the file by hand.
+
+=over
+
+=item S_func
+
+Controls S mode presentation (see L<"S: Variables & Status">).  If g, values are
+graphed; if s, values are like vmstat; if p, values are in a pivoted table.
+
+=item S_set
+
+Specifies which set of variables to display in L<"S: Variables & Status"> mode.
+See L<"VARIABLE SETS">.
+
+=item auto_wipe_dl
+
+Instructs innotop to automatically wipe large deadlocks when it notices them.
+When this happens you may notice a slight delay.  At the next tick, you will
+usually see the information that was being truncated by the large deadlock.
+
+=item charset
+
+Specifies what kind of characters to allow through the L<"no_ctrl_char">
+transformation.  This keeps non-printable characters from confusing a
+terminal when you monitor queries that contain binary data, such as images.
+
+The default is 'ascii', which considers anything outside normal ASCII to be a
+control character.  The other allowable values are 'unicode' and 'none'.  'none'
+considers every character a control character, which can be useful for
+collapsing ALL text fields in queries.
+
+=item cmd_filter
+
+This is the prefix that filters variables in L<"C: Command Summary"> mode.
+
+=item color
+
+Whether terminal coloring is permitted.
+
+=item cxn_timeout
+
+On MySQL versions 4.0.3 and newer, this variable is used to set the connection's
+timeout, so MySQL doesn't close the connection if it is not used for a while.
+This might happen because a connection isn't monitored in a particular mode, for
+example.
+
+=item debug
+
+This option enables more verbose errors and makes innotop more strict in some
+places.  It can help in debugging filters and other user-defined code.  It also
+makes innotop write a lot of information to L<"debugfile"> when there is a
+crash.
+
+=item debugfile
+
+A file to which innotop will write information when there is a crash.  See
+L<"FILES">.
+
+=item display_table_captions
+
+innotop displays a table caption above most tables.  This variable suppresses or
+shows captions on all tables globally.  Some tables are configured with the
+hide_caption property, which overrides this.
+
+=item global
+
+Whether to show GLOBAL variables and status.  innotop only tries to do this on
+servers which support the GLOBAL option to SHOW VARIABLES and SHOW STATUS.  In
+some MySQL versions, you need certain privileges to do this; if you don't have
+them, innotop will not be able to fetch any variable and status data.  This
+configuration variable lets you run innotop and fetch what data you can even
+without the elevated privileges.
+
+I can no longer find or reproduce the situation where GLOBAL wasn't allowed, but
+I know there was one.
+
+=item graph_char
+
+Defines the character to use when drawing graphs in L<"S: Variables & Status">
+mode.
+
+=item header_highlight
+
+Defines how to highlight column headers.  This only works if Term::ANSIColor is
+available.  Valid values are 'bold' and 'underline'.
+
+=item hide_hdr
+
+Hides column headers globally.
+
+=item interval
+
+The interval at which innotop will refresh its data (ticks).  The interval is
+implemented as a sleep time between ticks, so the true interval will vary
+depending on how long it takes innotop to fetch and render data.
+
+This variable accepts fractions of a second.
+
+=item mode
+
+The mode in which innotop should start.  Allowable arguments are the same as the
+key presses that select a mode interactively.  See L<"MODES">.
+
+=item num_digits
+
+How many digits to show in fractional numbers and percents.  This variable's
+range is between 0 and 9 and can be set directly from L<"S: Variables & Status">
+mode with the '+' and '-' keys.  It is used in the L<"set_precision">,
+L<"shorten">, and L<"percent"> transformations.
+
+=item num_status_sets
+
+Controls how many sets of status variables to display in pivoted L<"S: Variables
+& Status"> mode.  It also controls the number of old sets of variables innotop
+keeps in its memory, so the larger this variable is, the more memory innotop
+uses.
+
+=item plugin_dir
+
+Specifies where plugins can be found.  By default, innotop stores plugins in the
+'plugins' subdirectory of your innotop configuration directory.
+
+=item readonly
+
+Whether the configuration file is readonly.  This cannot be set interactively,
+because it would prevent itself from being written to the configuration file.
+
+=item show_cxn_errors
+
+Makes innotop print connection errors to STDOUT.  See L<"ERROR HANDLING">.
+
+=item show_cxn_errors_in_tbl
+
+Makes innotop display connection errors as rows in the first table on screen.
+See L<"ERROR HANDLING">.
+
+=item show_percent
+
+Adds a '%' character after the value returned by the L<"percent">
+transformation.
+
+=item show_statusbar
+
+Controls whether to show the status bar in the display.  See L<"INNOTOP
+STATUS">.
+
+=item skip_innodb
+
+Disables fetching SHOW INNODB STATUS, in case your server(s) do not have InnoDB
+enabled and you don't want innotop to try to fetch it.  This can also be useful
+when you don't have the SUPER privilege, required to run SHOW INNODB STATUS.
+
+=item status_inc
+
+Whether to show absolute or incremental values for status variables.
+Incremental values are calculated as an offset from the last value innotop saw
+for that variable.  This is a global setting, but will probably become
+mode-specific at some point.  Right now it is honored a bit inconsistently; some
+modes don't pay attention to it.
+
+=back
+
+=item plugins
+
+This section holds a list of package names of active plugins.  If the plugin
+exists, innotop will activate it.  See L<"PLUGINS"> for more information.
+
+=item filters
+
+This section holds user-defined filters (see L<"FILTERS">).  Each line is in the
+format filter_name=text='filter text' tbls='table list'.
+
+The filter text is the text of the subroutine's code.  The table list is a list
+of tables to which the filter can apply.  By default, user-defined filters apply
+to the table for which they were created, but you can manually override that by
+editing the definition in the configuration file.
+
+=item active_filters
+
+This section stores which filters are active on each table.  Each line is in the
+format table_name=filter_list.
+
+=item tbl_meta
+
+This section stores user-defined or user-customized columns (see L<"COLUMNS">).
+Each line is in the format col_name=properties, where the properties are a
+name=quoted-value list.
+
+=item connections
+
+This section holds the server connections you have defined.  Each line is in the
+format name=properties, where the properties are a name=value list.  The
+properties are self-explanatory, and the only one that is treated specially is
+'pass' which is only present if 'savepass' is set.  See L<"SERVER CONNECTIONS">.
+
+=item active_connections
+
+This section holds a list of which connections are active in each mode.  Each
+line is in the format mode_name=connection_list.
+
+=item server_groups
+
+This section holds server groups.  Each line is in the format
+name=connection_list.  See L<"SERVER GROUPS">.
+
+=item active_server_groups
+
+This section holds a list of which server group is active in each mode.  Each
+line is in the format mode_name=server_group.
+
+=item max_values_seen
+
+This section holds the maximum values seen for variables.  This is used to scale
+the graphs in L<"S: Variables & Status"> mode.  Each line is in the format
+name=value.
+
+=item active_columns
+
+This section holds table column lists.  Each line is in the format
+tbl_name=column_list.  See L<"COLUMNS">.
+
+=item sort_cols
+
+This section holds the sort definition.  Each line is in the format
+tbl_name=column_list.  If a column is prefixed with '-', that column sorts
+descending.  See L<"SORTING">.
+
+=item visible_tables
+
+This section defines which tables are visible in each mode.  Each line is in the
+format mode_name=table_list.  See L<"TABLES">.
+
+=item varsets
+
+This section defines variable sets for use in L<"S: Status & Variables"> mode.
+Each line is in the format name=variable_list.  See L<"VARIABLE SETS">.
+
+=item colors
+
+This section defines colorization rules.  Each line is in the format
+tbl_name=property_list.  See L<"COLORS">.
+
+=item stmt_sleep_times
+
+This section contains statement sleep times.  Each line is in the format
+statement_name=sleep_time.  See L<"S: Statement Sleep Times">.
+
+=item group_by
+
+This section contains column lists for table group_by expressions.  Each line is
+in the format tbl_name=column_list.  See L<"GROUPING">.
+
+=back
+
+=head1 CUSTOMIZING
+
+You can customize innotop a great deal.  For example, you can:
+
+=over
+
+=item *
+
+Choose which tables to display, and in what order.
+
+=item *
+
+Choose which columns are in those tables, and create new columns.
+
+=item *
+
+Filter which rows display with built-in filters, user-defined filters, and
+quick-filters.
+
+=item *
+
+Sort the rows to put important data first or group together related rows.
+
+=item *
+
+Highlight rows with color.
+
+=item *
+
+Customize the alignment, width, and formatting of columns, and apply
+transformations to columns to extract parts of their values or format the values
+as you wish (for example, shortening large numbers to familiar units).
+
+=item *
+
+Design your own expressions to extract and combine data as you need.  This gives
+you unlimited flexibility.
+
+=back
+
+All these and more are explained in the following sections.
+
+=head2 TABLES
+
+A table is what you'd expect: a collection of columns.  It also has some other
+properties, such as a caption.  Filters, sorting rules, and colorization rules
+belong to tables and are covered in later sections.
+
+Internally, table meta-data is defined in a data structure called %tbl_meta.
+This hash holds all built-in table definitions, which contain a lot of default
+instructions to innotop.  The meta-data includes the caption, a list of columns
+the user has customized, a list of columns, a list of visible columns, a list of
+filters, color rules, a sort-column list, sort direction, and some information
+about the table's data sources.  Most of this is customizable via the table
+editor (see L<"TABLE EDITOR">).
+
+You can choose which tables to show by pressing the '$' key.  See L<"MODES"> and
+L<"TABLES">.
+
+The table life-cycle is as follows:
+
+=over
+
+=item *
+
+Each table begins with a data source, which is an array of hashes.  See below
+for details on data sources.
+
+=item *
+
+Each element of the data source becomes a row in the final table.
+
+=item *
+
+For each element in the data source, innotop extracts values from the source and
+creates a row.  This row is another hash, which later steps will refer to as
+$set.  The values innotop extracts are determined by the table's columns.  Each
+column has an extraction subroutine, compiled from an expression (see
+L<"EXPRESSIONS">).  The resulting row is a hash whose keys are named the same as
+the column name.
+
+=item *
+
+innotop filters the rows, removing those that don't need to be displayed.  See
+L<"FILTERS">.
+
+=item *
+
+innotop sorts the rows.  See L<"SORTING">.
+
+=item *
+
+innotop groups the rows together, if specified.  See L<"GROUPING">.
+
+=item *
+
+innotop colorizes the rows.  See L<"COLORS">.
+
+=item *
+
+innotop transforms the column values in each row.  See L<"TRANSFORMATIONS">.
+
+=item *
+
+innotop optionally pivots the rows (see L<"PIVOTING">), then filters and sorts
+them.
+
+=item *
+
+innotop formats and justifies the rows as a table.  During this step, innotop
+applies further formatting to the column values, including alignment, maximum
+and minimum widths.  innotop also does final error checking to ensure there are
+no crashes due to undefined values.  innotop then adds a caption if specified,
+and the table is ready to print.
+
+=back
+
+The lifecycle is slightly different if the table is pivoted, as noted above.  To
+clarify, if the table is pivoted, the process is extract, group, transform,
+pivot, filter, sort, create.  If it's not pivoted, the process is extract,
+filter, sort, group, color, transform, create.  This slightly convoluted process
+doesn't map all that well to SQL, but pivoting complicates things pretty
+thoroughly.  Roughly speaking, filtering and sorting happen as late as needed to
+effect the final result as you might expect, but as early as possible for
+efficiency.
+
+Each built-in table is described below:
+
+=over
+
+=item adaptive_hash_index
+
+Displays data about InnoDB's adaptive hash index.  Data source:
+L<"STATUS_VARIABLES">.
+
+=item buffer_pool
+
+Displays data about InnoDB's buffer pool.  Data source: L<"STATUS_VARIABLES">.
+
+=item cmd_summary
+
+Displays weighted status variables.  Data source: L<"STATUS_VARIABLES">.
+
+=item deadlock_locks
+
+Shows which locks were held and waited for by the last detected deadlock.  Data
+source: L<"DEADLOCK_LOCKS">.
+
+=item deadlock_transactions
+
+Shows transactions involved in the last detected deadlock.  Data source:
+L<"DEADLOCK_TRANSACTIONS">.
+
+=item explain
+
+Shows the output of EXPLAIN.  Data source: L<"EXPLAIN">.
+
+=item file_io_misc
+
+Displays data about InnoDB's file and I/O operations.  Data source:
+L<"STATUS_VARIABLES">.
+
+=item fk_error
+
+Displays various data about InnoDB's last foreign key error.  Data source:
+L<"STATUS_VARIABLES">.
+
+=item innodb_locks
+
+Displays InnoDB locks.  Data source: L<"INNODB_LOCKS">.
+
+=item innodb_transactions
+
+Displays data about InnoDB's current transactions.  Data source:
+L<"INNODB_TRANSACTIONS">.
+
+=item insert_buffers
+
+Displays data about InnoDB's insert buffer.  Data source: L<"STATUS_VARIABLES">.
+
+=item io_threads
+
+Displays data about InnoDB's I/O threads.  Data source: L<"IO_THREADS">.
+
+=item log_statistics
+
+Displays data about InnoDB's logging system.  Data source: L<"STATUS_VARIABLES">.
+
+=item master_status
+
+Displays replication master status.  Data source: L<"STATUS_VARIABLES">.
+
+=item open_tables
+
+Displays open tables.  Data source: L<"OPEN_TABLES">.
+
+=item page_statistics
+
+Displays InnoDB page statistics.  Data source: L<"STATUS_VARIABLES">.
+
+=item pending_io
+
+Displays InnoDB pending I/O operations.  Data source: L<"STATUS_VARIABLES">.
+
+=item processlist
+
+Displays current MySQL processes (threads/connections).  Data source:
+L<"PROCESSLIST">.
+
+=item q_header
+
+Displays various status values.  Data source: L<"STATUS_VARIABLES">.
+
+=item row_operation_misc
+
+Displays data about InnoDB's row operations.  Data source:
+L<"STATUS_VARIABLES">.
+
+=item row_operations
+
+Displays data about InnoDB's row operations.  Data source:
+L<"STATUS_VARIABLES">.
+
+=item semaphores
+
+Displays data about InnoDB's semaphores and mutexes.  Data source:
+L<"STATUS_VARIABLES">.
+
+=item slave_io_status
+
+Displays data about the slave I/O thread.  Data source: 
+L<"STATUS_VARIABLES">.
+
+=item slave_sql_status
+
+Displays data about the slave SQL thread.  Data source: L<"STATUS_VARIABLES">.
+
+=item t_header
+
+Displays various InnoDB status values.  Data source: L<"STATUS_VARIABLES">.
+
+=item var_status
+
+Displays user-configurable data.  Data source: L<"STATUS_VARIABLES">.
+
+=item wait_array
+
+Displays data about InnoDB's OS wait array.  Data source: L<"OS_WAIT_ARRAY">.
+
+=back
+
+=head2 COLUMNS
+
+Columns belong to tables.  You can choose a table's columns by pressing the '^'
+key, which starts the L<"TABLE EDITOR"> and lets you choose and edit columns.
+Pressing 'e' from within the table editor lets you edit the column's properties:
+
+=over
+
+=item *
+
+hdr: a column header.  This appears in the first row of the table.
+
+=item *
+
+just: justification.  '-' means left-justified and '' means right-justified,
+just as with printf formatting codes (not a coincidence).
+
+=item *
+
+dec: whether to further align the column on the decimal point.
+
+=item *
+
+num: whether the column is numeric.  This affects how values are sorted
+(lexically or numerically).
+
+=item *
+
+label: a small note about the column, which appears in dialogs that help the
+user choose columns.
+
+=item *
+
+src: an expression that innotop uses to extract the column's data from its
+source (see L<"DATA SOURCES">).  See L<"EXPRESSIONS"> for more on expressions.
+
+=item *
+
+minw: specifies a minimum display width.  This helps stabilize the display,
+which makes it easier to read if the data is changing frequently.
+
+=item *
+
+maxw: similar to minw.
+
+=item *
+
+trans: a list of column transformations.  See L<"TRANSFORMATIONS">.
+
+=item *
+
+agg: an aggregate function.  See L<"GROUPING">.  The default is L<"first">.
+
+=item *
+
+aggonly: controls whether the column only shows when grouping is enabled on the
+table (see L<"GROUPING">).  By default, this is disabled.  This means columns
+will always be shown by default, whether grouping is enabled or not.  If a
+column's aggonly is set true, the column will appear when you toggle grouping on
+the table.  Several columns are set this way, such as the count column on
+L<"processlist"> and L<"innodb_transactions">, so you don't see a count when the
+grouping isn't enabled, but you do when it is.
+
+=back
+
+=head2 FILTERS
+
+Filters remove rows from the display.  They behave much like a WHERE clause in
+SQL.  innotop has several built-in filters, which remove irrelevant information
+like inactive queries, but you can define your own as well.  innotop also lets
+you create quick-filters, which do not get saved to the configuration file, and
+are just an easy way to quickly view only some rows.
+
+You can enable or disable a filter on any table.  Press the '%' key (mnemonic: %
+looks kind of like a line being filtered between two circles) and choose which
+table you want to filter, if asked.  You'll then see a list of possible filters
+and a list of filters currently enabled for that table.  Type the names of
+filters you want to apply and press Enter.
+
+=head3 USER-DEFINED FILTERS
+
+If you type a name that doesn't exist, innotop will prompt you to create the
+filter.  Filters are easy to create if you know Perl, and not hard if you don't.
+What you're doing is creating a subroutine that returns true if the row should
+be displayed.  The row is a hash reference passed to your subroutine as $set.
+
+For example, imagine you want to filter the processlist table so you only see
+queries that have been running more than five minutes.  Type a new name for your
+filter, and when prompted for the subroutine body, press TAB to initiate your
+terminal's auto-completion.  You'll see the names of the columns in the
+L<"processlist"> table (innotop generally tries to help you with auto-completion
+lists).  You want to filter on the 'time' column.  Type the text "$set->{time} >
+300" to return true when the query is more than five minutes old.  That's all
+you need to do.
+
+In other words, the code you're typing is surrounded by an implicit context,
+which looks like this:
+
+ sub filter {
+    my ( $set ) = @_;
+    # YOUR CODE HERE
+ }
+
+If your filter doesn't work, or if something else suddenly behaves differently,
+you might have made an error in your filter, and innotop is silently catching
+the error.  Try enabling L<"debug"> to make innotop throw an error instead.
+
+=head3 QUICK-FILTERS
+
+innotop's quick-filters are a shortcut to create a temporary filter that doesn't
+persist when you restart innotop.  To create a quick-filter, press the '/' key.
+innotop will prompt you for the column name and filter text.  Again, you can use
+auto-completion on column names.  The filter text can be just the text you want
+to "search for."  For example, to filter the L<"processlist"> table on queries
+that refer to the products table, type '/' and then 'info product'.
+
+The filter text can actually be any Perl regular expression, but of course a
+literal string like 'product' works fine as a regular expression.
+
+Behind the scenes innotop compiles the quick-filter into a specially tagged
+filter that is otherwise like any other filter.  It just isn't saved to the
+configuration file.
+
+To clear quick-filters, press the '\' key and innotop will clear them all at
+once.
+
+=head2 SORTING
+
+innotop has sensible built-in defaults to sort the most important rows to the
+top of the table.  Like anything else in innotop, you can customize how any
+table is sorted.
+
+To start the sort dialog, start the L<"TABLE EDITOR"> with the '^' key, choose a
+table if necessary, and press the 's' key.  You'll see a list of columns you can
+use in the sort expression and the current sort expression, if any.  Enter a
+list of columns by which you want to sort and press Enter.  If you want to
+reverse sort, prefix the column name with a minus sign.  For example, if you
+want to sort by column a ascending, then column b descending, type 'a -b'.  You
+can also explicitly add a + in front of columns you want to sort ascending, but
+it's not required.
+
+Some modes have keys mapped to open this dialog directly, and to quickly reverse
+sort direction.  Press '?' as usual to see which keys are mapped in any mode.
+
+=head2 GROUPING
+
+innotop can group, or aggregate, rows together (I use the terms
+interchangeably).  This is quite similar to an SQL GROUP BY clause.  You can
+specify to group on certain columns, or if you don't specify any, the entire set
+of rows is treated as one group.  This is quite like SQL so far, but unlike SQL,
+you can also select un-grouped columns.  innotop actually aggregates every
+column.  If you don't explicitly specify a grouping function, the default is
+'first'.  This is basically a convenience so you don't have to specify an
+aggregate function for every column you want in the result.
+
+You can quickly toggle grouping on a table with the '=' key, which toggles its
+aggregate property.  This property doesn't persist to the config file.
+
+The columns by which the table is grouped are specified in its group_by
+property.  When you turn grouping on, innotop places the group_by columns at the
+far left of the table, even if they're not supposed to be visible.  The rest of
+the visible columns appear in order after them.
+
+Two tables have default group_by lists and a count column built in:
+L<"processlist"> and L<"innodb_transactions">.  The grouping is by connection
+and status, so you can quickly see how many queries or transactions are in a
+given status on each server you're monitoring.  The time columns are aggregated
+as a sum; other columns are left at the default 'first' aggregation.
+
+By default, the table shown in L<"S: Variables & Status"> mode also uses
+grouping so you can monitor variables and status across many servers.  The
+default aggregation function in this mode is 'avg'.
+
+Valid grouping functions are defined in the %agg_funcs hash.  They include
+
+=over
+
+=item first
+
+Returns the first element in the group.
+
+=item count
+
+Returns the number of elements in the group, including undefined elements, much
+like SQL's COUNT(*).
+
+=item avg
+
+Returns the average of defined elements in the group.
+
+=item sum
+
+Returns the sum of elements in the group.
+
+=back
+
+Here's an example of grouping at work.  Suppose you have a very busy server with
+hundreds of open connections, and you want to see how many connections are in
+what status.  Using the built-in grouping rules, you can press 'Q' to enter
+L<"Q: Query List"> mode.  Press '=' to toggle grouping (if necessary, select the
+L<"processlist"> table when prompted).
+
+Your display might now look like the following:
+
+ Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38-log
+ 
+ CXN        Cmd        Cnt  ID      User   Host           Time   Query       
+ localhost  Query      49    12933  webusr localhost      19:38  SELECT * FROM
+ localhost  Sending Da 23     2383  webusr localhost      12:43  SELECT col1,
+ localhost  Sleep      120     140  webusr localhost    5:18:12
+ localhost  Statistics 12    19213  webusr localhost      01:19  SELECT * FROM
+
+That's actually quite a worrisome picture.  You've got a lot of idle connections
+(Sleep), and some connections executing queries (Query and Sending Data).
+That's okay, but you also have a lot in Statistics status, collectively spending
+over a minute.  That means the query optimizer is having a really hard time
+optimizing your statements.  Something is wrong; it should normally take
+milliseconds to optimize queries.  You might not have seen this pattern if you
+didn't look at your connections in aggregate.  (This is a made-up example, but
+it can happen in real life).
+
+=head2 PIVOTING
+
+innotop can pivot a table for more compact display, similar to a Pivot Table in
+a spreadsheet (also known as a crosstab).  Pivoting a table makes columns into
+rows.  Assume you start with this table:
+
+ foo bar
+ === ===
+ 1   3
+ 2   4
+
+After pivoting, the table will look like this:
+
+ name set0 set1
+ ==== ==== ====
+ foo  1    2
+ bar  3    4
+
+To get reasonable results, you might need to group as well as pivoting.
+innotop currently does this for L<"S: Variables & Status"> mode.
+
+=head2 COLORS
+
+By default, innotop highlights rows with color so you can see at a glance which
+rows are more important.  You can customize the colorization rules and add your
+own to any table.  Open the table editor with the '^' key, choose a table if
+needed, and press 'o' to open the color editor dialog.
+
+The color editor dialog displays the rules applied to the table, in the order
+they are evaluated.  Each row is evaluated against each rule to see if the rule
+matches the row; if it does, the row gets the specified color, and no further
+rules are evaluated.  The rules look like the following:
+
+ state  eq  Locked       black on_red
+ cmd    eq  Sleep        white       
+ user   eq  system user  white       
+ cmd    eq  Connect      white       
+ cmd    eq  Binlog Dump  white       
+ time   >   600          red         
+ time   >   120          yellow      
+ time   >   60           green       
+ time   >   30           cyan        
+
+This is the default rule set for the L<"processlist"> table.  In order of
+priority, these rules make locked queries black on a red background, "gray out"
+connections from replication and sleeping queries, and make queries turn from
+cyan to red as they run longer.
+
+(For some reason, the ANSI color code "white" is actually a light gray.  Your
+terminal's display may vary; experiment to find colors you like).
+
+You can use keystrokes to move the rules up and down, which re-orders their
+priority.  You can also delete rules and add new ones.  If you add a new rule,
+innotop prompts you for the column, an operator for the comparison, a value
+against which to compare the column, and a color to assign if the rule matches.
+There is auto-completion and prompting at each step.
+
+The value in the third step needs to be correctly quoted.  innotop does not try
+to quote the value because it doesn't know whether it should treat the value as
+a string or a number.  If you want to compare the column against a string, as
+for example in the first rule above, you should enter 'Locked' surrounded by
+quotes.  If you get an error message about a bareword, you probably should have
+quoted something.
+
+=head2 EXPRESSIONS
+
+Expressions are at the core of how innotop works, and are what enables you to
+extend innotop as you wish.  Recall the table lifecycle explained in
+L<"TABLES">.  Expressions are used in the earliest step, where it extracts
+values from a data source to form rows.
+
+It does this by calling a subroutine for each column, passing it the source data
+set, a set of current values, and a set of previous values.  These are all
+needed so the subroutine can calculate things like the difference between this
+tick and the previous tick.
+
+The subroutines that extract the data from the set are compiled from
+expressions.  This gives significantly more power than just naming the values to
+fill the columns, because it allows the column's value to be calculated from
+whatever data is necessary, but avoids the need to write complicated and lengthy
+Perl code.
+
+innotop begins with a string of text that can look as simple as a value's name
+or as complicated as a full-fledged Perl expression.  It looks at each
+'bareword' token in the string and decides whether it's supposed to be a key
+into the $set hash.  A bareword is an unquoted value that isn't already
+surrounded by code-ish things like dollar signs or curly brackets.  If innotop
+decides that the bareword isn't a function or other valid Perl code, it converts
+it into a hash access.  After the whole string is processed, innotop compiles a
+subroutine, like this:
+
+ sub compute_column_value {
+    my ( $set, $cur, $pre ) = @_;
+    my $val = # EXPANDED STRING GOES HERE
+    return $val;
+ }
+
+Here's a concrete example, taken from the header table L<"q_header"> in L<"Q:
+Query List"> mode.  This expression calculates the qps, or Queries Per Second,
+column's values, from the values returned by SHOW STATUS:
+
+ Questions/Uptime_hires
+
+innotop decides both words are barewords, and transforms this expression into
+the following Perl code:
+
+ $set->{Questions}/$set->{Uptime_hires}
+
+When surrounded by the rest of the subroutine's code, this is executable Perl
+that calculates a high-resolution queries-per-second value.
+
+The arguments to the subroutine are named $set, $cur, and $pre.  In most cases,
+$set and $cur will be the same values.  However, if L<"status_inc"> is set, $cur
+will not be the same as $set, because $set will already contain values that are
+the incremental difference between $cur and $pre.
+
+Every column in innotop is computed by subroutines compiled in the same fashion.
+There is no difference between innotop's built-in columns and user-defined
+columns.  This keeps things consistent and predictable.
+
+=head2 TRANSFORMATIONS
+
+Transformations change how a value is rendered.  For example, they can take a
+number of seconds and display it in H:M:S format.  The following transformations
+are defined:
+
+=over
+
+=item commify
+
+Adds commas to large numbers every three decimal places.
+
+=item dulint_to_int
+
+Accepts two unsigned integers and converts them into a single longlong.  This is
+useful for certain operations with InnoDB, which uses two integers as
+transaction identifiers, for example.
+
+=item no_ctrl_char
+
+Removes quoted control characters from the value.  This is affected by the
+L<"charset"> configuration variable.
+
+This transformation only operates within quoted strings, for example, values to
+a SET clause in an UPDATE statement.  It will not alter the UPDATE statement,
+but will collapse the quoted string to [BINARY] or [TEXT], depending on the
+charset.
+
+=item percent
+
+Converts a number to a percentage by multiplying it by two, formatting it with
+L<"num_digits"> digits after the decimal point, and optionally adding a percent
+sign (see L<"show_percent">).
+
+=item secs_to_time
+
+Formats a number of seconds as time in days+hours:minutes:seconds format.
+
+=item set_precision
+
+Formats numbers with L<"num_digits"> number of digits after the decimal point.
+
+=item shorten
+
+Formats a number as a unit of 1024 (k/M/G/T) and with L<"num_digits"> number of
+digits after the decimal point.
+
+=back
+
+=head2 TABLE EDITOR
+
+The innotop table editor lets you customize tables with keystrokes.  You start
+the table editor with the '^' key.  If there's more than one table on the
+screen, it will prompt you to choose one of them.  Once you do, innotop will
+show you something like this:
+
+ Editing table definition for Buffer Pool.  Press ? for help, q to quit.
+ 
+ name               hdr          label                  src          
+ cxn                CXN          Connection from which  cxn          
+ buf_pool_size      Size         Buffer pool size       IB_bp_buf_poo
+ buf_free           Free Bufs    Buffers free in the b  IB_bp_buf_fre
+ pages_total        Pages        Pages total            IB_bp_pages_t
+ pages_modified     Dirty Pages  Pages modified (dirty  IB_bp_pages_m
+ buf_pool_hit_rate  Hit Rate     Buffer pool hit rate   IB_bp_buf_poo
+ total_mem_alloc    Memory       Total memory allocate  IB_bp_total_m
+ add_pool_alloc     Add'l Pool   Additonal pool alloca  IB_bp_add_poo
+
+The first line shows which table you're editing, and reminds you again to press
+'?' for a list of key mappings.  The rest is a tabular representation of the
+table's columns, because that's likely what you're trying to edit.  However, you
+can edit more than just the table's columns; this screen can start the filter
+editor, color rule editor, and more.
+
+Each row in the display shows a single column in the table you're editing, along
+with a couple of its properties such as its header and source expression (see
+L<"EXPRESSIONS">).
+
+The key mappings are Vim-style, as in many other places.  Pressing 'j' and 'k'
+moves the highlight up or down.  You can then (d)elete or (e)dit the highlighted
+column.  You can also (a)dd a column to the table.  This actually just activates
+one of the columns already defined for the table; it prompts you to choose from
+among the columns available but not currently displayed.  Finally, you can
+re-order the columns with the '+' and '-' keys.
+
+You can do more than just edit the columns with the table editor, you can also
+edit other properties, such as the table's sort expression and group-by
+expression.  Press '?' to see the full list, of course.
+
+If you want to really customize and create your own column, as opposed to just
+activating a built-in one that's not currently displayed, press the (n)ew key,
+and innotop will prompt you for the information it needs:
+
+=over
+
+=item *
+
+The column name: this needs to be a word without any funny characters, e.g. just
+letters, numbers and underscores.
+
+=item *
+
+The column header: this is the label that appears at the top of the column, in
+the table header.  This can have spaces and funny characters, but be careful not
+to make it too wide and waste space on-screen.
+
+=item *
+
+The column's data source: this is an expression that determines what data from
+the source (see L<"TABLES">) innotop will put into the column.  This can just be
+the name of an item in the source, or it can be a more complex expression, as
+described in L<"EXPRESSIONS">.
+
+=back
+
+Once you've entered the required data, your table has a new column.  There is no
+difference between this column and the built-in ones; it can have all the same
+properties and behaviors.  innotop will write the column's definition to the
+configuration file, so it will persist across sessions.
+
+Here's an example: suppose you want to track how many times your slaves have
+retried transactions.  According to the MySQL manual, the
+Slave_retried_transactions status variable gives you that data: "The total
+number of times since startup that the replication slave SQL thread has retried
+transactions. This variable was added in version 5.0.4."  This is appropriate to
+add to the L<"slave_sql_status"> table.
+
+To add the column, switch to the replication-monitoring mode with the 'M' key,
+and press the '^' key to start the table editor.  When prompted, choose
+slave_sql_status as the table, then press 'n' to create the column.  Type
+'retries' as the column name, 'Retries' as the column header, and
+'Slave_retried_transactions' as the source.  Now the column is created, and you
+see the table editor screen again.  Press 'q' to exit the table editor, and
+you'll see your column at the end of the table.
+
+=head1 VARIABLE SETS
+
+Variable sets are used in L<"S: Variables & Status"> mode to define more easily
+what variables you want to monitor.  Behind the scenes they are compiled to a
+list of expressions, and then into a column list so they can be treated just
+like columns in any other table, in terms of data extraction and
+transformations.  However, you're protected from the tedious details by a syntax
+that ought to feel very natural to you: a SQL SELECT list.
+
+The data source for variable sets, and indeed the entire S mode, is the
+combination of SHOW STATUS, SHOW VARIABLES, and SHOW INNODB STATUS.  Imagine
+that you had a huge table with one column per variable returned from those
+statements.  That's the data source for variable sets.  You can now query this
+data source just like you'd expect.  For example:
+
+ Questions, Uptime, Questions/Uptime as QPS
+
+Behind the scenes innotop will split that variable set into three expressions,
+compile them and turn them into a table definition, then extract as usual.  This
+becomes a "variable set," or a "list of variables you want to monitor."
+
+innotop lets you name and save your variable sets, and writes them to the
+configuration file.  You can choose which variable set you want to see with the
+'c' key, or activate the next and previous sets with the '>' and '<' keys.
+There are many built-in variable sets as well, which should give you a good
+start for creating your own.  Press 'e' to edit the current variable set, or
+just to see how it's defined.  To create a new one, just press 'c' and type its
+name.
+
+You may want to use some of the functions listed in L<"TRANSFORMATIONS"> to help
+format the results.  In particular, L<"set_precision"> is often useful to limit
+the number of digits you see.  Extending the above example, here's how:
+
+ Questions, Uptime, set_precision(Questions/Uptime) as QPS
+
+Actually, this still needs a little more work.  If your L<"interval"> is less
+than one second, you might be dividing by zero because Uptime is incremental in
+this mode by default.  Instead, use Uptime_hires:
+
+ Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS
+
+This example is simple, but it shows how easy it is to choose which variables
+you want to monitor.
+
+=head1 PLUGINS
+
+innotop has a simple but powerful plugin mechanism by which you can extend
+or modify its existing functionality, and add new functionality.  innotop's
+plugin functionality is event-based: plugins register themselves to be called
+when events happen.  They then have a chance to influence the event.
+
+An innotop plugin is a Perl module placed in innotop's L<"plugin_dir">
+directory.  On UNIX systems, you can place a symbolic link to the module instead
+of putting the actual file there.  innotop automatically discovers the file.  If
+there is a corresponding entry in the L<"plugins"> configuration file section,
+innotop loads and activates the plugin.
+
+The module must conform to innotop's plugin interface.  Additionally, the source
+code of the module must be written in such a way that innotop can inspect the
+file and determine the package name and description.
+
+=head2 Package Source Convention
+
+innotop inspects the plugin module's source to determine the Perl package name.
+It looks for a line of the form "package Foo;" and if found, considers the
+plugin's package name to be Foo.  Of course the package name can be a valid Perl
+package name, with double semicolons and so on.
+
+It also looks for a description in the source code, to make the plugin editor
+more human-friendly.  The description is a comment line of the form "#
+description: Foo", where "Foo" is the text innotop will consider to be the
+plugin's description.
+
+=head2 Plugin Interface
+
+The innotop plugin interface is quite simple: innotop expects the plugin to be
+an object-oriented module it can call certain methods on.  The methods are
+
+=over
+
+=item new(%variables)
+
+This is the plugin's constructor.  It is passed a hash of innotop's variables,
+which it can manipulate (see L<"Plugin Variables">).  It must return a reference
+to the newly created plugin object.
+
+At construction time, innotop has only loaded the general configuration and
+created the default built-in variables with their default contents (which is
+quite a lot).  Therefore, the state of the program is exactly as in the innotop
+source code, plus the configuration variables from the L<"general"> section in
+the config file.
+
+If your plugin manipulates the variables, it is changing global data, which is
+shared by innotop and all plugins.  Plugins are loaded in the order they're
+listed in the config file.  Your plugin may load before or after another plugin,
+so there is a potential for conflict or interaction between plugins if they
+modify data other plugins use or modify.
+
+=item register_for_events()
+
+This method must return a list of events in which the plugin is interested, if
+any.  See L<"Plugin Events"> for the defined events.  If the plugin returns an
+event that's not defined, the event is ignored.
+
+=item event handlers
+
+The plugin must implement a method named the same as each event for which it has
+registered.  In other words, if the plugin returns qw(foo bar) from
+register_for_events(), it must have foo() and bar() methods.  These methods are
+callbacks for the events.  See L<"Plugin Events"> for more details about each
+event.
+
+=back
+
+=head2 Plugin Variables
+
+The plugin's constructor is passed a hash of innotop's variables, which it can
+manipulate.  It is probably a good idea if the plugin object saves a copy of it
+for later use.  The variables are defined in the innotop variable
+%pluggable_vars, and are as follows:
+
+=over
+
+=item action_for
+
+A hashref of key mappings.  These are innotop's global hot-keys.
+
+=item agg_funcs
+
+A hashref of functions that can be used for grouping.  See L<"GROUPING">.
+
+=item config
+
+The global configuration hash.
+
+=item connections
+
+A hashref of connection specifications.  These are just specifications of how to
+connect to a server.
+
+=item dbhs
+
+A hashref of innotop's database connections.  These are actual DBI connection
+objects.
+
+=item filters
+
+A hashref of filters applied to table rows.  See L<"FILTERS"> for more.
+
+=item modes
+
+A hashref of modes.  See L<"MODES"> for more.
+
+=item server_groups
+
+A hashref of server groups.  See L<"SERVER GROUPS">.
+
+=item tbl_meta
+
+A hashref of innotop's table meta-data, with one entry per table (see
+L<"TABLES"> for more information).
+
+=item trans_funcs
+
+A hashref of transformation functions.  See L<"TRANSFORMATIONS">.
+
+=item var_sets
+
+A hashref of variable sets.  See L<"VARIABLE SETS">.
+
+=back
+
+=head2 Plugin Events
+
+Each event is defined somewhere in the innotop source code.  When innotop runs
+that code, it executes the callback function for each plugin that expressed its
+interest in the event.  innotop passes some data for each event.  The events are
+defined in the %event_listener_for variable, and are as follows:
+
+=over
+
+=item extract_values($set, $cur, $pre, $tbl)
+
+This event occurs inside the function that extracts values from a data source.
+The arguments are the set of values, the current values, the previous values,
+and the table name.
+
+=item set_to_tbl
+
+Events are defined at many places in this subroutine, which is responsible for
+turning an arrayref of hashrefs into an arrayref of lines that can be printed to
+the screen.  The events all pass the same data: an arrayref of rows and the name
+of the table being created.  The events are set_to_tbl_pre_filter,
+set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize,
+set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create,
+set_to_tbl_post_create.
+
+=item draw_screen($lines)
+
+This event occurs inside the subroutine that prints the lines to the screen.
+$lines is an arrayref of strings.
+
+=back
+
+=head2 Simple Plugin Example
+
+The easiest way to explain the plugin functionality is probably with a simple
+example.  The following module adds a column to the beginning of every table and
+sets its value to 1.
+
+ use strict;
+ use warnings FATAL => 'all';
+ 
+ package Innotop::Plugin::Example;
+ # description: Adds an 'example' column to every table
+ 
+ sub new {
+    my ( $class, %vars ) = @_;
+    # Store reference to innotop's variables in $self
+    my $self = bless { %vars }, $class;
+ 
+    # Design the example column
+    my $col = {
+       hdr   => 'Example',
+       just  => '',
+       dec   => 0,
+       num   => 1,
+       label => 'Example',
+       src   => 'example', # Get data from this column in the data source
+       tbl   => '',
+       trans => [],
+    };
+ 
+    # Add the column to every table.
+    my $tbl_meta = $vars{tbl_meta};
+    foreach my $tbl ( values %$tbl_meta ) {
+       # Add the column to the list of defined columns
+       $tbl->{cols}->{example} = $col;
+       # Add the column to the list of visible columns
+       unshift @{$tbl->{visible}}, 'example';
+    }
+ 
+    # Be sure to return a reference to the object.
+    return $self;
+ }
+ 
+ # I'd like to be called when a data set is being rendered into a table, please.
+ sub register_for_events {
+    my ( $self ) = @_;
+    return qw(set_to_tbl_pre_filter);
+ }
+ 
+ # This method will be called when the event fires.
+ sub set_to_tbl_pre_filter {
+    my ( $self, $rows, $tbl ) = @_;
+    # Set the example column's data source to the value 1.
+    foreach my $row ( @$rows ) {
+       $row->{example} = 1;
+    }
+ }
+ 
+ 1;
+
+=head2 Plugin Editor
+
+The plugin editor lets you view the plugins innotop discovered and activate or
+deactivate them.  Start the editor by pressing $ to start the configuration
+editor from any mode.  Press the 'p' key to start the plugin editor.  You'll see
+a list of plugins innotop discovered.  You can use the 'j' and 'k' keys to move
+the highlight to the desired one, then press the * key to toggle it active or
+inactive.  Exit the editor and restart innotop for the changes to take effect.
+
+=head1 SQL STATEMENTS
+
+innotop uses a limited set of SQL statements to retrieve data from MySQL for
+display.  The statements are customized depending on the server version against
+which they are executed; for example, on MySQL 5 and newer, INNODB_STATUS
+executes "SHOW ENGINE INNODB STATUS", while on earlier versions it executes
+"SHOW INNODB STATUS".  The statements are as follows:
+
+ Statement           SQL executed
+ =================== ===============================
+ INNODB_STATUS       SHOW [ENGINE] INNODB STATUS
+ KILL_CONNECTION     KILL
+ KILL_QUERY          KILL QUERY
+ OPEN_TABLES         SHOW OPEN TABLES
+ PROCESSLIST         SHOW FULL PROCESSLIST
+ SHOW_MASTER_LOGS    SHOW MASTER LOGS
+ SHOW_MASTER_STATUS  SHOW MASTER STATUS
+ SHOW_SLAVE_STATUS   SHOW SLAVE STATUS
+ SHOW_STATUS         SHOW [GLOBAL] STATUS
+ SHOW_VARIABLES      SHOW [GLOBAL] VARIABLES
+
+=head1 DATA SOURCES
+
+Each time innotop extracts values to create a table (see L<"EXPRESSIONS"> and
+L<"TABLES">), it does so from a particular data source.  Largely because of the
+complex data extracted from SHOW INNODB STATUS, this is slightly messy.  SHOW
+INNODB STATUS contains a mixture of single values and repeated values that form
+nested data sets.
+
+Whenever innotop fetches data from MySQL, it adds two extra bits to each set:
+cxn and Uptime_hires.  cxn is the name of the connection from which the data
+came.  Uptime_hires is a high-resolution version of the server's Uptime status
+variable, which is important if your L<"interval"> setting is sub-second.
+
+Here are the kinds of data sources from which data is extracted:
+
+=over
+
+=item STATUS_VARIABLES
+
+This is the broadest category, into which the most kinds of data fall.  It
+begins with the combination of SHOW STATUS and SHOW VARIABLES, but other sources
+may be included as needed, for example, SHOW MASTER STATUS and SHOW SLAVE
+STATUS, as well as many of the non-repeated values from SHOW INNODB STATUS.
+
+=item DEADLOCK_LOCKS
+
+This data is extracted from the transaction list in the LATEST DETECTED DEADLOCK
+section of SHOW INNODB STATUS.  It is nested two levels deep: transactions, then
+locks.
+
+=item DEADLOCK_TRANSACTIONS
+
+This data is from the transaction list in the LATEST DETECTED DEADLOCK
+section of SHOW INNODB STATUS.  It is nested one level deep.
+
+=item EXPLAIN
+
+This data is from the result set returned by EXPLAIN.
+
+=item INNODB_TRANSACTIONS
+
+This data is from the TRANSACTIONS section of SHOW INNODB STATUS.
+
+=item IO_THREADS
+
+This data is from the list of threads in the the FILE I/O section of SHOW INNODB
+STATUS.
+
+=item INNODB_LOCKS
+
+This data is from the TRANSACTIONS section of SHOW INNODB STATUS and is nested
+two levels deep.
+
+=item OPEN_TABLES
+
+This data is from SHOW OPEN TABLES.
+
+=item PROCESSLIST
+
+This data is from SHOW FULL PROCESSLIST.
+
+=item OS_WAIT_ARRAY
+
+This data is from the SEMAPHORES section of SHOW INNODB STATUS and is nested one
+level deep.  It comes from the lines that look like this:
+
+ --Thread 1568861104 has waited at btr0cur.c line 424 ....
+
+=back
+
+=head1 MYSQL PRIVILEGES
+
+=over
+
+=item *
+
+You must connect to MySQL as a user who has the SUPER privilege for many of the
+functions.
+
+=item *
+
+If you don't have the SUPER privilege, you can still run some functions, but you
+won't necessarily see all the same data.
+
+=item *
+
+You need the PROCESS privilege to see the list of currently running queries in Q
+mode.
+
+=item *
+
+You need special privileges to start and stop slave servers.
+
+=item *
+
+You need appropriate privileges to create and drop the deadlock tables if needed
+(see L<"SERVER CONNECTIONS">).
+
+=back
+
+=head1 SYSTEM REQUIREMENTS
+
+You need Perl to run innotop, of course.  You also need a few Perl modules: DBI,
+DBD::mysql,  Term::ReadKey, and Time::HiRes.  These should be included with most
+Perl distributions, but in case they are not, I recommend using versions
+distributed with your operating system or Perl distribution, not from CPAN.
+Term::ReadKey in particular has been known to cause problems if installed from
+CPAN.
+
+If you have Term::ANSIColor, innotop will use it to format headers more readably
+and compactly.  (Under Microsoft Windows, you also need Win32::Console::ANSI for
+terminal formatting codes to be honored).  If you install Term::ReadLine,
+preferably Term::ReadLine::Gnu, you'll get nice auto-completion support.
+
+I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from
+people successfully running it on Red Hat, CentOS, Solaris, and Mac OSX.  I
+don't see any reason why it won't work on other UNIX-ish operating systems, but
+I don't know for sure.  It also runs on Windows under ActivePerl without
+problem.
+
+I use innotop on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, 5.1.15,
+and 5.2.3.  If it doesn't run correctly for you, that is a bug and I hope you
+report it.
+
+=head1 FILES
+
+$HOMEDIR/.innotop is used to store configuration information.  Files include the
+configuration file innotop.ini, the core_dump file which contains verbose error
+messages if L<"debug"> is enabled, and the plugins/ subdirectory.
+
+=head1 GLOSSARY OF TERMS
+
+=over
+
+=item tick
+
+A tick is a refresh event, when innotop re-fetches data from connections and
+displays it.
+
+=back
+
+=head1 ACKNOWLEDGEMENTS
+
+I'm grateful to the following people for various reasons, and hope I haven't
+forgotten to include anyone:
+
+Allen K. Smith,
+Aurimas Mikalauskas,
+Bartosz Fenski,
+Brian Miezejewski,
+Christian Hammers, 
+Cyril Scetbon,
+Dane Miller,
+David Multer,
+Dr. Frank Ullrich,
+Giuseppe Maxia,
+Google.com Site Reliability Engineers,
+Jan Pieter Kunst,
+Jari Aalto,
+Jay Pipes,
+Jeremy Zawodny,
+Johan Idren,
+Kristian Kohntopp,
+Lenz Grimmer,
+Maciej Dobrzanski,
+Michiel Betel,
+MySQL AB,
+Paul McCullagh,
+Sebastien Estienne,
+Sourceforge.net,
+Steven Kreuzer,
+The Gentoo MySQL Team,
+Trevor Price,
+Yaar Schnitman,
+and probably more people I've neglected to include.
+
+(If I misspelled your name, it's probably because I'm afraid of putting
+international characters into this documentation; earlier versions of Perl might
+not be able to compile it then).
+
+=head1 COPYRIGHT, LICENSE AND WARRANTY
+
+This program is copyright (c) 2006 Baron Schwartz.
+Feedback and improvements are welcome.
+
+THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, version 2; OR the Perl Artistic License.  On UNIX and similar
+systems, you can issue `man perlgpl' or `man perlartistic' to read these
+licenses.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA  02111-1307  USA.
+
+Execute innotop and press '!' to see this information at any time.
+
+=head1 AUTHOR
+
+Baron Schwartz.
+
+=head1 BUGS
+
+You can report bugs, ask for improvements, and get other help and support at
+L<http://sourceforge.net/projects/innotop>.  There are mailing lists, forums,
+a bug tracker, etc.  Please use these instead of contacting me directly, as it
+makes my job easier and benefits others if the discussions are permanent and
+public.  Of course, if you need to contact me in private, please do.
+
+=cut

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop.1
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop.1	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/innotop/innotop.1	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2086 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "INNOTOP 1p"
+.TH INNOTOP 1p "2007-11-09" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+innotop \- MySQL and InnoDB transaction/status monitor.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+To monitor servers normally:
+.PP
+.Vb 1
+\& innotop
+.Ve
+.PP
+To monitor InnoDB status information from a file:
+.PP
+.Vb 1
+\& innotop /var/log/mysql/mysqld.err
+.Ve
+.PP
+To run innotop non-interactively in a pipe-and-filter configuration:
+.PP
+.Vb 1
+\& innotop \-\-count 5 \-d 1 \-n
+.Ve
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+innotop monitors MySQL servers.  Each of its modes shows you a different aspect
+of what's happening in the server.  For example, there's a mode for monitoring
+replication, one for queries, and one for transactions.  innotop refreshes its
+data periodically, so you see an updating view.
+.PP
+innotop has lots of features for power users, but you can start and run it with
+virtually no configuration.  If you're just getting started, see
+\&\*(L"\s-1QUICK\-START\s0\*(R".  Press '?' at any time while running innotop for
+context-sensitive help.
+.SH "QUICK-START"
+.IX Header "QUICK-START"
+To start innotop, open a terminal or command prompt.  If you have installed
+innotop on your system, you should be able to just type \*(L"innotop\*(R" and press
+Enter; otherwise, you will need to change to innotop's directory and type \*(L"perl
+innotop\*(R".
+.PP
+The first thing innotop needs to know is how to connect to a MySQL server.  You
+can just enter the hostname of the server, for example \*(L"localhost\*(R" or
+\&\*(L"127.0.0.1\*(R" if the server is on the same machine as innotop.  After this innotop
+will prompt you for a \s-1DSN\s0 (data source name).  You should be able to just accept
+the defaults by pressing Enter.
+.PP
+When innotop asks you about a table to use when resetting InnoDB deadlock
+information, just accept the default for now.  This is an advanced feature you
+can configure later (see \*(L"D: InnoDB Deadlocks\*(R" for more).
+.PP
+If you have a .my.cnf file with your MySQL connection defaults, innotop can read
+it, and you won't need to specify a username and password if it's in that file.
+Otherwise, you should answer 'y' to the next couple of prompts.
+.PP
+After this, you should be connected, and innotop should show you something like
+the following:
+.PP
+.Vb 1
+\& InnoDB Txns (? for help) localhost, 01:11:19, InnoDB 10s :\-), 50 QPS,
+.Ve
+.PP
+.Vb 2
+\& CXN        History  Versions  Undo  Dirty Buf  Used Bufs  Txns  MaxTxn
+\& localhost        7      2035  0 0       0.00%     92.19%     1   07:34
+.Ve
+.PP
+.Vb 5
+\& CXN        ID     User   Host       Txn Status  Time   Undo  Query Tex
+\& localhost  98379  user1  webserver  ACTIVE      07:34     0  SELECT `c
+\& localhost  98450  user1  webserver  ACTIVE      01:06     0  INSERT IN
+\& localhost  97750  user1  webserver  not starte  00:00     0      
+\& localhost  98375  user1  appserver  not starte  00:00     0
+.Ve
+.PP
+(This sample is truncated at the right so it will fit on a terminal when running
+\&'man innotop')
+.PP
+This sample comes from a quiet server with few transactions active.  If your
+server is busy, you'll see more output.  Notice the first line on the screen,
+which tells you what mode you're in and what server you're connected to.  You
+can change to other modes with keystrokes; press 'Q' to switch to a list of
+currently running queries.
+.PP
+Press the '?' key to see what keys are active in the current mode.  You can
+press any of these keys and innotop will either take the requested action or
+prompt you for more input.  If your system has Term::ReadLine support, you can
+use \s-1TAB\s0 and other keys to auto-complete and edit input.
+.PP
+To quit innotop, press the 'q' key.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+innotop is mostly configured via its configuration file, but some of the
+configuration options can come from the command line.  You can also specify a
+file to monitor for InnoDB status output; see \*(L"\s-1MONITORING\s0 A \s-1FILE\s0\*(R" for more
+details.
+.PP
+You can negate some options by prefixing the option name with \-\-no.  For
+example, \-\-noinc (or \-\-no\-inc) negates \*(L"\-\-inc\*(R".
+.IP "\-\-help" 4
+.IX Item "--help"
+Print a summary of command-line usage and exit.
+.IP "\-\-color" 4
+.IX Item "--color"
+Enable or disable terminal coloring.  Corresponds to the \*(L"color\*(R" config file
+setting.
+.IP "\-\-config" 4
+.IX Item "--config"
+Specifies a configuration file to read.  This option is non\-sticky, that is to
+say it does not persist to the configuration file itself.
+.IP "\-\-nonint" 4
+.IX Item "--nonint"
+Enable non-interactive operation.  See \*(L"\s-1NON\-INTERACTIVE\s0 \s-1OPERATION\s0\*(R" for more.
+.IP "\-\-count" 4
+.IX Item "--count"
+Refresh only the specified number of times (ticks) before exiting.  Each refresh
+is a pause for \*(L"interval\*(R" seconds, followed by requesting data from MySQL
+connections and printing it to the terminal.
+.IP "\-\-delay" 4
+.IX Item "--delay"
+Specifies the amount of time to pause between ticks (refreshes).  Corresponds to
+the configuration option \*(L"interval\*(R".
+.IP "\-\-mode" 4
+.IX Item "--mode"
+Specifies the mode in which innotop should start.  Corresponds to the
+configuration option \*(L"mode\*(R".
+.IP "\-\-inc" 4
+.IX Item "--inc"
+Specifies whether innotop should display absolute numbers or relative numbers
+(offsets from their previous values).  Corresponds to the configuration option
+\&\*(L"status_inc\*(R".
+.IP "\-\-version" 4
+.IX Item "--version"
+Output version information and exit.
+.SH "HOTKEYS"
+.IX Header "HOTKEYS"
+innotop is interactive, and you control it with key\-presses.
+.IP "\(bu" 4
+Uppercase keys switch between modes.
+.IP "\(bu" 4
+Lowercase keys initiate some action within the current mode.
+.IP "\(bu" 4
+Other keys do something special like change configuration or show the
+innotop license.
+.PP
+Press '?' at any time to see the currently active keys and what they do.
+.SH "MODES"
+.IX Header "MODES"
+Each of innotop's modes retrieves and displays a particular type of data from
+the servers you're monitoring.  You switch between modes with uppercase keys.
+The following is a brief description of each mode, in alphabetical order.  To
+switch to the mode, press the key listed in front of its heading in the
+following list:
+.IP "B: InnoDB Buffers" 4
+.IX Item "B: InnoDB Buffers"
+This mode displays information about the InnoDB buffer pool, page statistics,
+insert buffer, and adaptive hash index.  The data comes from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.
+.Sp
+This mode contains the \*(L"buffer_pool\*(R", \*(L"page_statistics\*(R",
+\&\*(L"insert_buffers\*(R", and \*(L"adaptive_hash_index\*(R" tables by default.
+.IP "C: Command Summary" 4
+.IX Item "C: Command Summary"
+This mode is similar to mytop's Command Summary mode.  It shows the
+\&\*(L"cmd_summary\*(R" table, which looks something like the following:
+.Sp
+.Vb 8
+\& Command Summary (? for help) localhost, 25+07:16:43, 2.45 QPS, 3 thd, 5.0.40
+\& _____________________ Command Summary _____________________
+\& Name                    Value    Pct     Last Incr  Pct    
+\& Select_scan             3244858  69.89%          2  100.00%
+\& Select_range            1354177  29.17%          0    0.00%
+\& Select_full_join          39479   0.85%          0    0.00%
+\& Select_full_range_join     4097   0.09%          0    0.00%
+\& Select_range_check            0   0.00%          0    0.00%
+.Ve
+.Sp
+The command summary table is built by extracting variables from
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".  The variables must be numeric and must match the prefix
+given by the \*(L"cmd_filter\*(R" configuration variable.  The variables are then
+sorted by value descending and compared to the last variable, as shown above.
+The percentage columns are percentage of the total of all variables in the
+table, so you can see the relative weight of the variables.
+.Sp
+The example shows what you see if the prefix is \*(L"Select_\*(R".  The default
+prefix is \*(L"Com_\*(R".  You can choose a prefix with the 's' key.
+.Sp
+It's rather like running \s-1SHOW\s0 \s-1VARIABLES\s0 \s-1LIKE\s0 \*(L"prefix%\*(R" with memory and
+nice formatting.
+.Sp
+Values are aggregated across all servers.  The Pct columns are not correctly
+aggregated across multiple servers.  This is a known limitation of the grouping
+algorithm that may be fixed in the future.
+.IP "D: InnoDB Deadlocks" 4
+.IX Item "D: InnoDB Deadlocks"
+This mode shows the transactions involved in the last InnoDB deadlock.  A second
+table shows the locks each transaction held and waited for.  A deadlock is
+caused by a cycle in the waits-for graph, so there should be two locks held and
+one waited for unless the deadlock information is truncated.
+.Sp
+InnoDB puts deadlock information before some other information in the \s-1SHOW\s0
+\&\s-1INNODB\s0 \s-1STATUS\s0 output.  If there are a lot of locks, the deadlock information can
+grow very large, and there is a limit on the size of the \s-1SHOW\s0 \s-1INNODB\s0
+\&\s-1STATUS\s0 output.  A large deadlock can fill the entire output, or even be
+truncated, and prevent you from seeing other information at all.  If you are
+running innotop in another mode, for example T mode, and suddenly you don't see
+anything, you might want to check and see if a deadlock has wiped out the data
+you need.
+.Sp
+If it has, you can create a small deadlock to replace the large one.  Use the
+\&'w' key to 'wipe' the large deadlock with a small one.  This will not work
+unless you have defined a deadlock table for the connection (see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R").
+.Sp
+You can also configure innotop to automatically detect when a large deadlock
+needs to be replaced with a small one (see \*(L"auto_wipe_dl\*(R").
+.Sp
+This mode displays the \*(L"deadlock_transactions\*(R" and \*(L"deadlock_locks\*(R" tables
+by default.
+.IP "F: InnoDB Foreign Key Errors" 4
+.IX Item "F: InnoDB Foreign Key Errors"
+This mode shows the last InnoDB foreign key error information, such as the
+table where it happened, when and who and what query caused it, and so on.
+.Sp
+InnoDB has a huge variety of foreign key error messages, and many of them are
+just hard to parse.  innotop doesn't always do the best job here, but there's
+so much code devoted to parsing this messy, unparseable output that innotop is
+likely never to be perfect in this regard.  If innotop doesn't show you what
+you need to see, just look at the status text directly.
+.Sp
+This mode displays the \*(L"fk_error\*(R" table by default.
+.IP "I: InnoDB I/O Info" 4
+.IX Item "I: InnoDB I/O Info"
+This mode shows InnoDB's I/O statistics, including the I/O threads, pending I/O,
+file I/O miscellaneous, and log statistics.  It displays the \*(L"io_threads\*(R",
+\&\*(L"pending_io\*(R", \*(L"file_io_misc\*(R", and \*(L"log_statistics\*(R" tables by default.
+.IP "L: Locks" 4
+.IX Item "L: Locks"
+This mode shows information about current locks.  At the moment only InnoDB
+locks are supported, and by default you'll only see locks for which transactions
+are waiting.  This information comes from the \s-1TRANSACTIONS\s0 section of the InnoDB
+status text.  If you have a very busy server, you may have frequent lock waits;
+it helps to be able to see which tables and indexes are the \*(L"hot spot\*(R" for
+locks.  If your server is running pretty well, this mode should show nothing.
+.Sp
+You can configure MySQL and innotop to monitor not only locks for which a
+transaction is waiting, but those currently held, too.  You can do this with the
+InnoDB Lock Monitor (<http://dev.mysql.com/doc/en/innodb\-monitor.html>).  It's
+not documented in the MySQL manual, but creating the lock monitor with the
+following statement also affects the output of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, which innotop
+uses:
+.Sp
+.Vb 1
+\&  CREATE TABLE innodb_lock_monitor(a int) ENGINE=INNODB;
+.Ve
+.Sp
+This causes InnoDB to print its output to the MySQL file every 16 seconds or so,
+as stated in the manual, but it also makes the normal \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output
+include lock information, which innotop can parse and display (that's the
+undocumented feature).
+.Sp
+This means you can do what may have seemed impossible: to a limited extent
+(InnoDB truncates some information in the output), you can see which transaction
+holds the locks something else is waiting for.  You can also enable and disable
+the InnoDB Lock Monitor with the key mappings in this mode.
+.Sp
+This mode displays the \*(L"innodb_locks\*(R" table by default.  Here's a sample of
+the screen when one connection is waiting for locks another connection holds:
+.Sp
+.Vb 7
+\& _________________________________ InnoDB Locks __________________________
+\& CXN        ID  Type    Waiting  Wait   Active  Mode  DB    Table  Index
+\& localhost  12  RECORD        1  00:10   00:10  X     test  t1     PRIMARY
+\& localhost  12  TABLE         0  00:10   00:10  IX    test  t1
+\& localhost  12  RECORD        1  00:10   00:10  X     test  t1     PRIMARY
+\& localhost  11  TABLE         0  00:00   00:25  IX    test  t1
+\& localhost  11  RECORD        0  00:00   00:25  X     test  t1     PRIMARY
+.Ve
+.Sp
+You can see the first connection, \s-1ID\s0 12, is waiting for a lock on the \s-1PRIMARY\s0
+key on test.t1, and has been waiting for 10 seconds.  The second connection
+isn't waiting, because the Waiting column is 0, but it holds locks on the same
+index.  That tells you connection 11 is blocking connection 12.
+.IP "M: Master/Slave Replication Status" 4
+.IX Item "M: Master/Slave Replication Status"
+This mode shows the output of \s-1SHOW\s0 \s-1SLAVE\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 in three
+tables.  The first two divide the slave's status into \s-1SQL\s0 and I/O thread status,
+and the last shows master status.  Filters are applied to eliminate non-slave
+servers from the slave tables, and non-master servers from the master table.
+.Sp
+This mode displays the \*(L"slave_sql_status\*(R", \*(L"slave_io_status\*(R", and
+\&\*(L"master_status\*(R" tables by default.
+.IP "O: Open Tables" 4
+.IX Item "O: Open Tables"
+This section comes from MySQL's \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0 command.  By default it is
+filtered to show tables which are in use by one or more queries, so you can
+get a quick look at which tables are 'hot'.  You can use this to guess which
+tables might be locked implicitly.
+.Sp
+This mode displays the \*(L"open_tables\*(R" mode by default.
+.IP "Q: Query List" 4
+.IX Item "Q: Query List"
+This mode displays the output from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0, much like \fBmytop\fR's
+query list mode.  This mode does \fBnot\fR show InnoDB-related information.  This
+is probably one of the most useful modes for general usage.
+.Sp
+There is an informative header that shows general status information about
+your server.  You can toggle it on and off with the 'h' key.  By default,
+innotop hides inactive processes and its own process.  You can toggle these on
+and off with the 'i' and 'a' keys.
+.Sp
+You can \s-1EXPLAIN\s0 a query from this mode with the 'e' key.  This displays the
+query's full text, the results of \s-1EXPLAIN\s0, and in newer MySQL versions, even
+the optimized query resulting from \s-1EXPLAIN\s0 \s-1EXTENDED\s0.  innotop also tries to
+rewrite certain queries to make them EXPLAIN\-able.  For example, \s-1INSERT/SELECT\s0
+statements are rewritable.
+.Sp
+This mode displays the \*(L"q_header\*(R" and \*(L"processlist\*(R" tables by default.
+.IP "R: InnoDB Row Operations and Semaphores" 4
+.IX Item "R: InnoDB Row Operations and Semaphores"
+This mode shows InnoDB row operations, row operation miscellaneous, semaphores,
+and information from the wait array.  It displays the \*(L"row_operations\*(R",
+\&\*(L"row_operation_misc\*(R", \*(L"semaphores\*(R", and \*(L"wait_array\*(R" tables by default.
+.IP "S: Variables & Status" 4
+.IX Item "S: Variables & Status"
+This mode calculates statistics, such as queries per second, and prints them out
+in several different styles.  You can show absolute values, or incremental values
+between ticks.
+.Sp
+You can switch between the views by pressing a key.  The 's' key prints a
+single line each time the screen updates, in the style of \fBvmstat\fR.  The 'g'
+key changes the view to a graph of the same numbers, sort of like \fBtload\fR.
+The 'v' key changes the view to a pivoted table of variable names on the left,
+with successive updates scrolling across the screen from left to right.  You can
+choose how many updates to put on the screen with the \*(L"num_status_sets\*(R"
+configuration variable.
+.Sp
+Headers may be abbreviated to fit on the screen in interactive operation.  You
+choose which variables to display with the 'c' key, which selects from
+predefined sets, or lets you create your own sets.  You can edit the current set
+with the 'e' key.
+.Sp
+This mode doesn't really display any tables like other modes.  Instead, it uses
+a table definition to extract and format the data, but it then transforms the
+result in special ways before outputting it.  It uses the \*(L"var_status\*(R" table
+definition for this.
+.IP "T: InnoDB Transactions" 4
+.IX Item "T: InnoDB Transactions"
+This mode shows transactions from the InnoDB monitor's output, in \fBtop\fR\-like
+format.  This mode is the reason I wrote innotop.
+.Sp
+You can kill queries or processes with the 'k' and 'x' keys, and \s-1EXPLAIN\s0 a query
+with the 'e' or 'f' keys.  InnoDB doesn't print the full query in transactions,
+so explaining may not work right if the query is truncated.
+.Sp
+The informational header can be toggled on and off with the 'h' key.  By
+default, innotop hides inactive transactions and its own transaction.  You can
+toggle this on and off with the 'i' and 'a' keys.
+.Sp
+This mode displays the \*(L"t_header\*(R" and \*(L"innodb_transactions\*(R" tables by
+default.
+.SH "INNOTOP STATUS"
+.IX Header "INNOTOP STATUS"
+The first line innotop displays is a \*(L"status bar\*(R" of sorts.  What it contains
+depends on the mode you're in, and what servers you're monitoring.  The first
+few words are always the innotop mode, such as \*(L"InnoDB Txns\*(R" for T mode,
+followed by a reminder to press '?' for help at any time.
+.Sh "\s-1ONE\s0 \s-1SERVER\s0"
+.IX Subsection "ONE SERVER"
+The simplest case is when you're monitoring a single server.  In this case, the
+name of the connection is next on the status line.  This is the name you gave
+when you created the connection \*(-- most likely the MySQL server's hostname.
+This is followed by the server's uptime.
+.PP
+If you're in an InnoDB mode, such as T or B, the next word is \*(L"InnoDB\*(R" followed
+by some information about the \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 output used to render the
+screen.  The first word is the number of seconds since the last \s-1SHOW\s0 \s-1INNODB\s0
+\&\s-1STATUS\s0, which InnoDB uses to calculate some per-second statistics.  The next is
+a smiley face indicating whether the InnoDB output is truncated.  If the smiley
+face is a :\-), all is well; there is no truncation.  A :^| means the transaction
+list is so long, InnoDB has only printed out some of the transactions.  Finally,
+a frown :\-( means the output is incomplete, which is probably due to a deadlock
+printing too much lock information (see \*(L"D: InnoDB Deadlocks\*(R").
+.PP
+The next two words indicate the server's queries per second (\s-1QPS\s0) and how many
+threads (connections) exist.  Finally, the server's version number is the last
+thing on the line.
+.Sh "\s-1MULTIPLE\s0 \s-1SERVERS\s0"
+.IX Subsection "MULTIPLE SERVERS"
+If you are monitoring multiple servers (see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R"), the status
+line does not show any details about individual servers.  Instead, it shows the
+names of the connections that are active.  Again, these are connection names you
+specified, which are likely to be the server's hostname.  A connection that has
+an error is prefixed with an exclamation point.
+.PP
+If you are monitoring a group of servers (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R"), the status
+line shows the name of the group.  If any connection in the group has an
+error, the group's name is followed by the fraction of the connections that
+don't have errors.
+.PP
+See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R" for more details about innotop's error handling.
+.Sh "\s-1MONITORING\s0 A \s-1FILE\s0"
+.IX Subsection "MONITORING A FILE"
+If you give a filename on the command line, innotop will not connect to \s-1ANY\s0
+servers at all.  It will watch the specified file for InnoDB status output and
+use that as its data source.  It will always show a single connection called
+\&'file'.  And since it can't connect to a server, it can't determine how long the
+server it's monitoring has been up; so it calculates the server's uptime as time
+since innotop started running.
+.SH "SERVER ADMINISTRATION"
+.IX Header "SERVER ADMINISTRATION"
+While innotop is primarily a monitor that lets you watch and analyze your
+servers, it can also send commands to servers.  The most frequently useful
+commands are killing queries and stopping or starting slaves.
+.PP
+You can kill a connection, or in newer versions of MySQL kill a query but not a
+connection, from \*(L"Q: Query List\*(R" and \*(L"T: InnoDB Transactions\*(R" modes.
+Press 'k' to issue a \s-1KILL\s0 command, or 'x' to issue a \s-1KILL\s0 \s-1QUERY\s0 command.
+innotop will prompt you for the server and/or connection \s-1ID\s0 to kill (innotop
+does not prompt you if there is only one possible choice for any input).
+innotop pre-selects the longest-running query, or the oldest connection.
+Confirm the command with 'y'.
+.PP
+In \*(L"M: Master/Slave Replication Status\*(R" mode, you can start and stop slaves
+with the 'a' and 'o' keys, respectively.  You can send these commands to many
+slaves at once.  innotop fills in a default command of \s-1START\s0 \s-1SLAVE\s0 or \s-1STOP\s0 \s-1SLAVE\s0
+for you, but you can actually edit the command and send anything you wish, such
+as \s-1SET\s0 \s-1GLOBAL\s0 SQL_SLAVE_SKIP_COUNTER=1 to make the slave skip one binlog event
+when it starts.
+.PP
+You can also ask innotop to calculate the earliest binlog in use by any slave
+and issue a \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0 on the master.  Use the 'b' key for this.  innotop
+will prompt you for a master to run the command on, then prompt you for the
+connection names of that master's slaves (there is no way for innotop to
+determine this reliably itself).  innotop will find the minimum binlog in use by
+these slave connections and suggest it as the argument to \s-1PURGE\s0 \s-1MASTER\s0 \s-1LOGS\s0.
+.SH "SERVER CONNECTIONS"
+.IX Header "SERVER CONNECTIONS"
+When you create a server connection, innotop asks you for a series of inputs, as
+follows:
+.IP "\s-1DSN\s0" 4
+.IX Item "DSN"
+A \s-1DSN\s0 is a Data Source Name, which is the initial argument passed to the \s-1DBI\s0
+module for connecting to a server.  It is usually of the form
+.Sp
+.Vb 1
+\& DBI:mysql:;mysql_read_default_group=mysql;host=HOSTNAME
+.Ve
+.Sp
+Since this \s-1DSN\s0 is passed to the DBD::mysql driver, you should read the driver's
+documentation at \*(L"http://search.cpan.org/dist/DBD\-mysql/lib/DBD/mysql.pm\*(R" for
+the exact details on all the options you can pass the driver in the \s-1DSN\s0.  You
+can read more about \s-1DBI\s0 at <http://dbi.perl.org/docs/>, and especially at
+<http://search.cpan.org/~timb/DBI/DBI.pm>.
+.Sp
+The mysql_read_default_group=mysql option lets the \s-1DBD\s0 driver read your MySQL
+options files, such as ~/.my.cnf on UNIX-ish systems.  You can use this to avoid
+specifying a username or password for the connection.
+.IP "InnoDB Deadlock Table" 4
+.IX Item "InnoDB Deadlock Table"
+This optional item tells innotop a table name it can use to deliberately create
+a small deadlock (see \*(L"D: InnoDB Deadlocks\*(R").  If you specify this option,
+you just need to be sure the table doesn't exist, and that innotop can create
+and drop the table with the InnoDB storage engine.  You can safely omit or just
+accept the default if you don't intend to use this.
+.IP "Username" 4
+.IX Item "Username"
+innotop will ask you if you want to specify a username.  If you say 'y', it will
+then prompt you for a user name.  If you have a MySQL option file that specifies
+your username, you don't have to specify a username.
+.Sp
+The username defaults to your login name on the system you're running innotop on.
+.IP "Password" 4
+.IX Item "Password"
+innotop will ask you if you want to specify a password.  Like the username, the
+password is optional, but there's an additional prompt that asks if you want to
+save the password in the innotop configuration file.  If you don't save it in
+the configuration file, innotop will prompt you for a password each time it
+starts.  Passwords in the innotop configuration file are saved in plain text,
+not encrypted in any way.
+.PP
+Once you finish answering these questions, you should be connected to a server.
+But innotop isn't limited to monitoring a single server; you can define many
+server connections and switch between them by pressing the '@' key.  See
+\&\*(L"\s-1SWITCHING\s0 \s-1BETWEEN\s0 \s-1CONNECTIONS\s0\*(R".
+.PP
+To create a new connection, press the '@' key and type the name of the new
+connection, then follow the steps given above.
+.SH "SERVER GROUPS"
+.IX Header "SERVER GROUPS"
+If you have multiple MySQL instances, you can put them into named groups, such
+as 'all', 'masters', and 'slaves', which innotop can monitor all together.
+.PP
+You can choose which group to monitor with the '#' key, and you can press the
+\&\s-1TAB\s0 key to switch to the next group.  If you're not currently monitoring a
+group, pressing \s-1TAB\s0 selects the first group.
+.PP
+To create a group, press the '#' key and type the name of your new group, then
+type the names of the connections you want the group to contain.
+.SH "SWITCHING BETWEEN CONNECTIONS"
+.IX Header "SWITCHING BETWEEN CONNECTIONS"
+innotop lets you quickly switch which servers you're monitoring.  The most basic
+way is by pressing the '@' key and typing the name(s) of the connection(s) you
+want to use.  This setting is per\-mode, so you can monitor different connections
+in each mode, and innotop remembers which connections you choose.
+.PP
+You can quickly switch to the 'next' connection in alphabetical order with the
+\&'n' key.  If you're monitoring a server group (see \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R") this will
+switch to the first connection.
+.PP
+You can also type many connection names, and innotop will fetch and display data
+from them all.  Just separate the connection names with spaces, for example
+\&\*(L"server1 server2.\*(R"  Again, if you type the name of a connection that doesn't
+exist, innotop will prompt you for connection information and create the
+connection.
+.PP
+Another way to monitor multiple connections at once is with server groups.  You
+can use the \s-1TAB\s0 key to switch to the 'next' group in alphabetical order, or if
+you're not monitoring any groups, \s-1TAB\s0 will switch to the first group.
+.PP
+innotop does not fetch data in parallel from connections, so if you are
+monitoring a large group or many connections, you may notice increased delay
+between ticks.
+.PP
+When you monitor more than one connection, innotop's status bar changes.  See
+\&\*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R".
+.SH "ERROR HANDLING"
+.IX Header "ERROR HANDLING"
+Error handling is not that important when monitoring a single connection, but is
+crucial when you have many active connections.  A crashed server or lost
+connection should not crash innotop.  As a result, innotop will continue to run
+even when there is an error; it just won't display any information from the
+connection that had an error.  Because of this, innotop's behavior might confuse
+you.  It's a feature, not a bug!
+.PP
+innotop does not continue to query connections that have errors, because they
+may slow innotop and make it hard to use, especially if the error is a problem
+connecting and causes a long time\-out.  Instead, innotop retries the connection
+occasionally to see if the error still exists.  If so, it will wait until some
+point in the future.  The wait time increases in ticks as the Fibonacci series,
+so it tries less frequently as time passes.
+.PP
+Since errors might only happen in certain modes because of the \s-1SQL\s0 commands
+issued in those modes, innotop keeps track of which mode caused the error.  If
+you switch to a different mode, innotop will retry the connection instead of
+waiting.
+.PP
+By default innotop will display the problem in red text at the bottom of the
+first table on the screen.  You can disable this behavior with the
+\&\*(L"show_cxn_errors_in_tbl\*(R" configuration option, which is enabled by default.
+If the \*(L"debug\*(R" option is enabled, innotop will display the error at the
+bottom of every table, not just the first.  And if \*(L"show_cxn_errors\*(R" is
+enabled, innotop will print the error text to \s-1STDOUT\s0 as well.  Error messages
+might only display in the mode that caused the error, depending on the mode and
+whether innotop is avoiding querying that connection.
+.SH "NON-INTERACTIVE OPERATION"
+.IX Header "NON-INTERACTIVE OPERATION"
+You can run innotop in non-interactive mode, in which case it is entirely
+controlled from the configuration file and command-line options.  To start
+innotop in non-interactive mode, give the L\*(L"<\-\-nonint\*(R"> command-line option.
+This changes innotop's behavior in the following ways:
+.IP "\(bu" 4
+Certain Perl modules are not loaded.  Term::Readline is not loaded, since
+innotop doesn't prompt interactively.  Term::ANSIColor and Win32::Console::ANSI
+modules are not loaded.  Term::ReadKey is still used, since innotop may have to
+prompt for connection passwords when starting up.
+.IP "\(bu" 4
+innotop does not clear the screen after each tick.
+.IP "\(bu" 4
+innotop does not persist any changes to the configuration file.
+.IP "\(bu" 4
+If \*(L"\-\-count\*(R" is given and innotop is in incremental mode (see \*(L"status_inc\*(R"
+and \*(L"\-\-inc\*(R"), innotop actually refreshes one more time than specified so it
+can print incremental statistics.  This suppresses output during the first
+tick, so innotop may appear to hang.
+.IP "\(bu" 4
+innotop only displays the first table in each mode.  This is so the output can
+be easily processed with other command-line utilities such as awk and sed.  To
+change which tables display in each mode, see \*(L"\s-1TABLES\s0\*(R".  Since \*(L"Q: Query List\*(R" mode is so important, innotop automatically disables the \*(L"q_header\*(R"
+table.  This ensures you'll see the \*(L"processlist\*(R" table, even if you have
+innotop configured to show the q_header table during interactive operation.
+Similarly, in \*(L"T: InnoDB Transactions\*(R" mode, the \*(L"t_header\*(R" table is
+suppressed so you see only the \*(L"innodb_transactions\*(R" table.
+.IP "\(bu" 4
+All output is tab-separated instead of being column-aligned with whitespace, and
+innotop prints the full contents of each table instead of only printing one
+screenful at a time.
+.IP "\(bu" 4
+innotop only prints column headers once instead of every tick (see
+\&\*(L"hide_hdr\*(R").  innotop does not print table captions (see
+\&\*(L"display_table_captions\*(R").  innotop ensures there are no empty lines in the
+output.
+.IP "\(bu" 4
+innotop does not honor the \*(L"shorten\*(R" transformation, which normally shortens
+some numbers to human-readable formats.
+.IP "\(bu" 4
+innotop does not print a status line (see \*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R").
+.SH "CONFIGURING"
+.IX Header "CONFIGURING"
+Nearly everything about innotop is configurable.  Most things are possible to
+change with built-in commands, but you can also edit the configuration file.
+.PP
+While running innotop, press the '$' key to bring up the configuration editing
+dialog.  Press another key to select the type of data you want to edit:
+.IP "S: Statement Sleep Times" 4
+.IX Item "S: Statement Sleep Times"
+Edits \s-1SQL\s0 statement sleep delays, which make innotop pause for the specified
+amount of time after executing a statement.  See \*(L"\s-1SQL\s0 \s-1STATEMENTS\s0\*(R" for a
+definition of each statement and what it does.  By default innotop does not
+delay after any statements.
+.Sp
+This feature is included so you can customize the side-effects caused by
+monitoring your server.  You may not see any effects, but some innotop users
+have noticed that certain MySQL versions under very high load with InnoDB
+enabled take longer than usual to execute \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0.  If innotop calls
+\&\s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0 immediately afterward, the processlist contains more
+queries than the machine actually averages at any given moment.  Configuring
+innotop to pause briefly after calling \s-1SHOW\s0 \s-1GLOBAL\s0 \s-1STATUS\s0 alleviates this
+effect.
+.Sp
+Sleep times are stored in the \*(L"stmt_sleep_times\*(R" section of the configuration
+file.  Fractional-second sleeps are supported, subject to your hardware's
+limitations.
+.IP "c: Edit Columns" 4
+.IX Item "c: Edit Columns"
+Starts the table editor on one of the displayed tables.  See \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R".
+An alternative way to start the table editor without entering the configuration
+dialog is with the '^' key.
+.IP "g: General Configuration" 4
+.IX Item "g: General Configuration"
+Starts the configuration editor to edit global and mode-specific configuration
+variables (see \*(L"\s-1MODES\s0\*(R").  innotop prompts you to choose a variable from among
+the global and mode-specific ones depending on the current mode.
+.IP "k: Row-Coloring Rules" 4
+.IX Item "k: Row-Coloring Rules"
+Starts the row-coloring rules editor on one of the displayed table(s).  See
+\&\*(L"\s-1COLORS\s0\*(R" for details.
+.IP "p: Manage Plugins" 4
+.IX Item "p: Manage Plugins"
+Starts the plugin configuration editor.  See \*(L"\s-1PLUGINS\s0\*(R" for details.
+.IP "s: Server Groups" 4
+.IX Item "s: Server Groups"
+Lets you create and edit server groups.  See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R".
+.IP "t: Choose Displayed Tables" 4
+.IX Item "t: Choose Displayed Tables"
+Lets you choose which tables to display in this mode.  See \*(L"\s-1MODES\s0\*(R" and
+\&\*(L"\s-1TABLES\s0\*(R".
+.SH "CONFIGURATION FILE"
+.IX Header "CONFIGURATION FILE"
+innotop's default configuration file location is in \f(CW$HOME\fR/.innotop, but can be
+overridden with the \*(L"\-\-config\*(R" command-line option.  You can edit it by hand
+safely.  innotop reads the configuration file when it starts, and writes it out
+again when it exits, so any changes you make while innotop is running will be
+lost.
+.PP
+innotop doesn't store its entire configuration in the configuration file.  It
+has a huge set of default configuration that it holds only in memory, and the
+configuration file only overrides these defaults.  When you customize a default
+setting, innotop notices, and then stores the customizations into the file.
+This keeps the file size down, makes it easier to edit, and makes upgrades
+easier.
+.PP
+A configuration file can be made read\-only.  See \*(L"readonly\*(R".
+.PP
+The configuration file is arranged into sections like an \s-1INI\s0 file.  Each
+section begins with [section\-name] and ends with [/section\-name].  Each
+section's entries have a different syntax depending on the data they need to
+store.  You can put comments in the file; any line that begins with a #
+character is a comment.  innotop will not read the comments, so it won't write
+them back out to the file when it exits.  Comments in read-only configuration
+files are still useful, though.
+.PP
+The first line in the file is innotop's version number.  This lets innotop
+notice when the file format is not backwards\-compatible, and upgrade smoothly
+without destroying your customized configuration.
+.PP
+The following list describes each section of the configuration file and the data
+it contains:
+.IP "general" 4
+.IX Item "general"
+The 'general' section contains global configuration variables and variables that
+may be mode\-specific, but don't belong in any other section.  The syntax is a
+simple key=value list.  innotop writes a comment above each value to help you
+edit the file by hand.
+.RS 4
+.IP "S_func" 4
+.IX Item "S_func"
+Controls S mode presentation (see \*(L"S: Variables & Status\*(R").  If g, values are
+graphed; if s, values are like vmstat; if p, values are in a pivoted table.
+.IP "S_set" 4
+.IX Item "S_set"
+Specifies which set of variables to display in \*(L"S: Variables & Status\*(R" mode.
+See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R".
+.IP "auto_wipe_dl" 4
+.IX Item "auto_wipe_dl"
+Instructs innotop to automatically wipe large deadlocks when it notices them.
+When this happens you may notice a slight delay.  At the next tick, you will
+usually see the information that was being truncated by the large deadlock.
+.IP "charset" 4
+.IX Item "charset"
+Specifies what kind of characters to allow through the \*(L"no_ctrl_char\*(R"
+transformation.  This keeps non-printable characters from confusing a
+terminal when you monitor queries that contain binary data, such as images.
+.Sp
+The default is 'ascii', which considers anything outside normal \s-1ASCII\s0 to be a
+control character.  The other allowable values are 'unicode' and 'none'.  'none'
+considers every character a control character, which can be useful for
+collapsing \s-1ALL\s0 text fields in queries.
+.IP "cmd_filter" 4
+.IX Item "cmd_filter"
+This is the prefix that filters variables in \*(L"C: Command Summary\*(R" mode.
+.IP "color" 4
+.IX Item "color"
+Whether terminal coloring is permitted.
+.IP "cxn_timeout" 4
+.IX Item "cxn_timeout"
+On MySQL versions 4.0.3 and newer, this variable is used to set the connection's
+timeout, so MySQL doesn't close the connection if it is not used for a while.
+This might happen because a connection isn't monitored in a particular mode, for
+example.
+.IP "debug" 4
+.IX Item "debug"
+This option enables more verbose errors and makes innotop more strict in some
+places.  It can help in debugging filters and other user-defined code.  It also
+makes innotop write a lot of information to \*(L"debugfile\*(R" when there is a
+crash.
+.IP "debugfile" 4
+.IX Item "debugfile"
+A file to which innotop will write information when there is a crash.  See
+\&\*(L"\s-1FILES\s0\*(R".
+.IP "display_table_captions" 4
+.IX Item "display_table_captions"
+innotop displays a table caption above most tables.  This variable suppresses or
+shows captions on all tables globally.  Some tables are configured with the
+hide_caption property, which overrides this.
+.IP "global" 4
+.IX Item "global"
+Whether to show \s-1GLOBAL\s0 variables and status.  innotop only tries to do this on
+servers which support the \s-1GLOBAL\s0 option to \s-1SHOW\s0 \s-1VARIABLES\s0 and \s-1SHOW\s0 \s-1STATUS\s0.  In
+some MySQL versions, you need certain privileges to do this; if you don't have
+them, innotop will not be able to fetch any variable and status data.  This
+configuration variable lets you run innotop and fetch what data you can even
+without the elevated privileges.
+.Sp
+I can no longer find or reproduce the situation where \s-1GLOBAL\s0 wasn't allowed, but
+I know there was one.
+.IP "graph_char" 4
+.IX Item "graph_char"
+Defines the character to use when drawing graphs in \*(L"S: Variables & Status\*(R"
+mode.
+.IP "header_highlight" 4
+.IX Item "header_highlight"
+Defines how to highlight column headers.  This only works if Term::ANSIColor is
+available.  Valid values are 'bold' and 'underline'.
+.IP "hide_hdr" 4
+.IX Item "hide_hdr"
+Hides column headers globally.
+.IP "interval" 4
+.IX Item "interval"
+The interval at which innotop will refresh its data (ticks).  The interval is
+implemented as a sleep time between ticks, so the true interval will vary
+depending on how long it takes innotop to fetch and render data.
+.Sp
+This variable accepts fractions of a second.
+.IP "mode" 4
+.IX Item "mode"
+The mode in which innotop should start.  Allowable arguments are the same as the
+key presses that select a mode interactively.  See \*(L"\s-1MODES\s0\*(R".
+.IP "num_digits" 4
+.IX Item "num_digits"
+How many digits to show in fractional numbers and percents.  This variable's
+range is between 0 and 9 and can be set directly from \*(L"S: Variables & Status\*(R"
+mode with the '+' and '\-' keys.  It is used in the \*(L"set_precision\*(R",
+\&\*(L"shorten\*(R", and \*(L"percent\*(R" transformations.
+.IP "num_status_sets" 4
+.IX Item "num_status_sets"
+Controls how many sets of status variables to display in pivoted \*(L"S: Variables & Status\*(R" mode.  It also controls the number of old sets of variables innotop
+keeps in its memory, so the larger this variable is, the more memory innotop
+uses.
+.IP "plugin_dir" 4
+.IX Item "plugin_dir"
+Specifies where plugins can be found.  By default, innotop stores plugins in the
+\&'plugins' subdirectory of your innotop configuration directory.
+.IP "readonly" 4
+.IX Item "readonly"
+Whether the configuration file is readonly.  This cannot be set interactively,
+because it would prevent itself from being written to the configuration file.
+.IP "show_cxn_errors" 4
+.IX Item "show_cxn_errors"
+Makes innotop print connection errors to \s-1STDOUT\s0.  See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R".
+.IP "show_cxn_errors_in_tbl" 4
+.IX Item "show_cxn_errors_in_tbl"
+Makes innotop display connection errors as rows in the first table on screen.
+See \*(L"\s-1ERROR\s0 \s-1HANDLING\s0\*(R".
+.IP "show_percent" 4
+.IX Item "show_percent"
+Adds a '%' character after the value returned by the \*(L"percent\*(R"
+transformation.
+.IP "show_statusbar" 4
+.IX Item "show_statusbar"
+Controls whether to show the status bar in the display.  See \*(L"\s-1INNOTOP\s0 \s-1STATUS\s0\*(R".
+.IP "skip_innodb" 4
+.IX Item "skip_innodb"
+Disables fetching \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, in case your server(s) do not have InnoDB
+enabled and you don't want innotop to try to fetch it.  This can also be useful
+when you don't have the \s-1SUPER\s0 privilege, required to run \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.
+.IP "status_inc" 4
+.IX Item "status_inc"
+Whether to show absolute or incremental values for status variables.
+Incremental values are calculated as an offset from the last value innotop saw
+for that variable.  This is a global setting, but will probably become
+mode-specific at some point.  Right now it is honored a bit inconsistently; some
+modes don't pay attention to it.
+.RE
+.RS 4
+.RE
+.IP "plugins" 4
+.IX Item "plugins"
+This section holds a list of package names of active plugins.  If the plugin
+exists, innotop will activate it.  See \*(L"\s-1PLUGINS\s0\*(R" for more information.
+.IP "filters" 4
+.IX Item "filters"
+This section holds user-defined filters (see \*(L"\s-1FILTERS\s0\*(R").  Each line is in the
+format filter_name=text='filter text' tbls='table list'.
+.Sp
+The filter text is the text of the subroutine's code.  The table list is a list
+of tables to which the filter can apply.  By default, user-defined filters apply
+to the table for which they were created, but you can manually override that by
+editing the definition in the configuration file.
+.IP "active_filters" 4
+.IX Item "active_filters"
+This section stores which filters are active on each table.  Each line is in the
+format table_name=filter_list.
+.IP "tbl_meta" 4
+.IX Item "tbl_meta"
+This section stores user-defined or user-customized columns (see \*(L"\s-1COLUMNS\s0\*(R").
+Each line is in the format col_name=properties, where the properties are a
+name=quoted\-value list.
+.IP "connections" 4
+.IX Item "connections"
+This section holds the server connections you have defined.  Each line is in the
+format name=properties, where the properties are a name=value list.  The
+properties are self\-explanatory, and the only one that is treated specially is
+\&'pass' which is only present if 'savepass' is set.  See \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R".
+.IP "active_connections" 4
+.IX Item "active_connections"
+This section holds a list of which connections are active in each mode.  Each
+line is in the format mode_name=connection_list.
+.IP "server_groups" 4
+.IX Item "server_groups"
+This section holds server groups.  Each line is in the format
+name=connection_list.  See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R".
+.IP "active_server_groups" 4
+.IX Item "active_server_groups"
+This section holds a list of which server group is active in each mode.  Each
+line is in the format mode_name=server_group.
+.IP "max_values_seen" 4
+.IX Item "max_values_seen"
+This section holds the maximum values seen for variables.  This is used to scale
+the graphs in \*(L"S: Variables & Status\*(R" mode.  Each line is in the format
+name=value.
+.IP "active_columns" 4
+.IX Item "active_columns"
+This section holds table column lists.  Each line is in the format
+tbl_name=column_list.  See \*(L"\s-1COLUMNS\s0\*(R".
+.IP "sort_cols" 4
+.IX Item "sort_cols"
+This section holds the sort definition.  Each line is in the format
+tbl_name=column_list.  If a column is prefixed with '\-', that column sorts
+descending.  See \*(L"\s-1SORTING\s0\*(R".
+.IP "visible_tables" 4
+.IX Item "visible_tables"
+This section defines which tables are visible in each mode.  Each line is in the
+format mode_name=table_list.  See \*(L"\s-1TABLES\s0\*(R".
+.IP "varsets" 4
+.IX Item "varsets"
+This section defines variable sets for use in \*(L"S: Status & Variables\*(R" mode.
+Each line is in the format name=variable_list.  See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R".
+.IP "colors" 4
+.IX Item "colors"
+This section defines colorization rules.  Each line is in the format
+tbl_name=property_list.  See \*(L"\s-1COLORS\s0\*(R".
+.IP "stmt_sleep_times" 4
+.IX Item "stmt_sleep_times"
+This section contains statement sleep times.  Each line is in the format
+statement_name=sleep_time.  See \*(L"S: Statement Sleep Times\*(R".
+.IP "group_by" 4
+.IX Item "group_by"
+This section contains column lists for table group_by expressions.  Each line is
+in the format tbl_name=column_list.  See \*(L"\s-1GROUPING\s0\*(R".
+.SH "CUSTOMIZING"
+.IX Header "CUSTOMIZING"
+You can customize innotop a great deal.  For example, you can:
+.IP "\(bu" 4
+Choose which tables to display, and in what order.
+.IP "\(bu" 4
+Choose which columns are in those tables, and create new columns.
+.IP "\(bu" 4
+Filter which rows display with built-in filters, user-defined filters, and
+quick\-filters.
+.IP "\(bu" 4
+Sort the rows to put important data first or group together related rows.
+.IP "\(bu" 4
+Highlight rows with color.
+.IP "\(bu" 4
+Customize the alignment, width, and formatting of columns, and apply
+transformations to columns to extract parts of their values or format the values
+as you wish (for example, shortening large numbers to familiar units).
+.IP "\(bu" 4
+Design your own expressions to extract and combine data as you need.  This gives
+you unlimited flexibility.
+.PP
+All these and more are explained in the following sections.
+.Sh "\s-1TABLES\s0"
+.IX Subsection "TABLES"
+A table is what you'd expect: a collection of columns.  It also has some other
+properties, such as a caption.  Filters, sorting rules, and colorization rules
+belong to tables and are covered in later sections.
+.PP
+Internally, table meta-data is defined in a data structure called \f(CW%tbl_meta\fR.
+This hash holds all built-in table definitions, which contain a lot of default
+instructions to innotop.  The meta-data includes the caption, a list of columns
+the user has customized, a list of columns, a list of visible columns, a list of
+filters, color rules, a sort-column list, sort direction, and some information
+about the table's data sources.  Most of this is customizable via the table
+editor (see \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R").
+.PP
+You can choose which tables to show by pressing the '$' key.  See \*(L"\s-1MODES\s0\*(R" and
+\&\*(L"\s-1TABLES\s0\*(R".
+.PP
+The table life-cycle is as follows:
+.IP "\(bu" 4
+Each table begins with a data source, which is an array of hashes.  See below
+for details on data sources.
+.IP "\(bu" 4
+Each element of the data source becomes a row in the final table.
+.IP "\(bu" 4
+For each element in the data source, innotop extracts values from the source and
+creates a row.  This row is another hash, which later steps will refer to as
+\&\f(CW$set\fR.  The values innotop extracts are determined by the table's columns.  Each
+column has an extraction subroutine, compiled from an expression (see
+\&\*(L"\s-1EXPRESSIONS\s0\*(R").  The resulting row is a hash whose keys are named the same as
+the column name.
+.IP "\(bu" 4
+innotop filters the rows, removing those that don't need to be displayed.  See
+\&\*(L"\s-1FILTERS\s0\*(R".
+.IP "\(bu" 4
+innotop sorts the rows.  See \*(L"\s-1SORTING\s0\*(R".
+.IP "\(bu" 4
+innotop groups the rows together, if specified.  See \*(L"\s-1GROUPING\s0\*(R".
+.IP "\(bu" 4
+innotop colorizes the rows.  See \*(L"\s-1COLORS\s0\*(R".
+.IP "\(bu" 4
+innotop transforms the column values in each row.  See \*(L"\s-1TRANSFORMATIONS\s0\*(R".
+.IP "\(bu" 4
+innotop optionally pivots the rows (see \*(L"\s-1PIVOTING\s0\*(R"), then filters and sorts
+them.
+.IP "\(bu" 4
+innotop formats and justifies the rows as a table.  During this step, innotop
+applies further formatting to the column values, including alignment, maximum
+and minimum widths.  innotop also does final error checking to ensure there are
+no crashes due to undefined values.  innotop then adds a caption if specified,
+and the table is ready to print.
+.PP
+The lifecycle is slightly different if the table is pivoted, as noted above.  To
+clarify, if the table is pivoted, the process is extract, group, transform,
+pivot, filter, sort, create.  If it's not pivoted, the process is extract,
+filter, sort, group, color, transform, create.  This slightly convoluted process
+doesn't map all that well to \s-1SQL\s0, but pivoting complicates things pretty
+thoroughly.  Roughly speaking, filtering and sorting happen as late as needed to
+effect the final result as you might expect, but as early as possible for
+efficiency.
+.PP
+Each built-in table is described below:
+.IP "adaptive_hash_index" 4
+.IX Item "adaptive_hash_index"
+Displays data about InnoDB's adaptive hash index.  Data source:
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "buffer_pool" 4
+.IX Item "buffer_pool"
+Displays data about InnoDB's buffer pool.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "cmd_summary" 4
+.IX Item "cmd_summary"
+Displays weighted status variables.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "deadlock_locks" 4
+.IX Item "deadlock_locks"
+Shows which locks were held and waited for by the last detected deadlock.  Data
+source: \*(L"\s-1DEADLOCK_LOCKS\s0\*(R".
+.IP "deadlock_transactions" 4
+.IX Item "deadlock_transactions"
+Shows transactions involved in the last detected deadlock.  Data source:
+\&\*(L"\s-1DEADLOCK_TRANSACTIONS\s0\*(R".
+.IP "explain" 4
+.IX Item "explain"
+Shows the output of \s-1EXPLAIN\s0.  Data source: \*(L"\s-1EXPLAIN\s0\*(R".
+.IP "file_io_misc" 4
+.IX Item "file_io_misc"
+Displays data about InnoDB's file and I/O operations.  Data source:
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "fk_error" 4
+.IX Item "fk_error"
+Displays various data about InnoDB's last foreign key error.  Data source:
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "innodb_locks" 4
+.IX Item "innodb_locks"
+Displays InnoDB locks.  Data source: \*(L"\s-1INNODB_LOCKS\s0\*(R".
+.IP "innodb_transactions" 4
+.IX Item "innodb_transactions"
+Displays data about InnoDB's current transactions.  Data source:
+\&\*(L"\s-1INNODB_TRANSACTIONS\s0\*(R".
+.IP "insert_buffers" 4
+.IX Item "insert_buffers"
+Displays data about InnoDB's insert buffer.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "io_threads" 4
+.IX Item "io_threads"
+Displays data about InnoDB's I/O threads.  Data source: \*(L"\s-1IO_THREADS\s0\*(R".
+.IP "log_statistics" 4
+.IX Item "log_statistics"
+Displays data about InnoDB's logging system.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "master_status" 4
+.IX Item "master_status"
+Displays replication master status.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "open_tables" 4
+.IX Item "open_tables"
+Displays open tables.  Data source: \*(L"\s-1OPEN_TABLES\s0\*(R".
+.IP "page_statistics" 4
+.IX Item "page_statistics"
+Displays InnoDB page statistics.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "pending_io" 4
+.IX Item "pending_io"
+Displays InnoDB pending I/O operations.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "processlist" 4
+.IX Item "processlist"
+Displays current MySQL processes (threads/connections).  Data source:
+\&\*(L"\s-1PROCESSLIST\s0\*(R".
+.IP "q_header" 4
+.IX Item "q_header"
+Displays various status values.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "row_operation_misc" 4
+.IX Item "row_operation_misc"
+Displays data about InnoDB's row operations.  Data source:
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "row_operations" 4
+.IX Item "row_operations"
+Displays data about InnoDB's row operations.  Data source:
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "semaphores" 4
+.IX Item "semaphores"
+Displays data about InnoDB's semaphores and mutexes.  Data source:
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "slave_io_status" 4
+.IX Item "slave_io_status"
+Displays data about the slave I/O thread.  Data source: 
+\&\*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "slave_sql_status" 4
+.IX Item "slave_sql_status"
+Displays data about the slave \s-1SQL\s0 thread.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "t_header" 4
+.IX Item "t_header"
+Displays various InnoDB status values.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "var_status" 4
+.IX Item "var_status"
+Displays user-configurable data.  Data source: \*(L"\s-1STATUS_VARIABLES\s0\*(R".
+.IP "wait_array" 4
+.IX Item "wait_array"
+Displays data about InnoDB's \s-1OS\s0 wait array.  Data source: \*(L"\s-1OS_WAIT_ARRAY\s0\*(R".
+.Sh "\s-1COLUMNS\s0"
+.IX Subsection "COLUMNS"
+Columns belong to tables.  You can choose a table's columns by pressing the '^'
+key, which starts the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" and lets you choose and edit columns.
+Pressing 'e' from within the table editor lets you edit the column's properties:
+.IP "\(bu" 4
+hdr: a column header.  This appears in the first row of the table.
+.IP "\(bu" 4
+just: justification.  '\-' means left-justified and '' means right\-justified,
+just as with printf formatting codes (not a coincidence).
+.IP "\(bu" 4
+dec: whether to further align the column on the decimal point.
+.IP "\(bu" 4
+num: whether the column is numeric.  This affects how values are sorted
+(lexically or numerically).
+.IP "\(bu" 4
+label: a small note about the column, which appears in dialogs that help the
+user choose columns.
+.IP "\(bu" 4
+src: an expression that innotop uses to extract the column's data from its
+source (see \*(L"\s-1DATA\s0 \s-1SOURCES\s0\*(R").  See \*(L"\s-1EXPRESSIONS\s0\*(R" for more on expressions.
+.IP "\(bu" 4
+minw: specifies a minimum display width.  This helps stabilize the display,
+which makes it easier to read if the data is changing frequently.
+.IP "\(bu" 4
+maxw: similar to minw.
+.IP "\(bu" 4
+trans: a list of column transformations.  See \*(L"\s-1TRANSFORMATIONS\s0\*(R".
+.IP "\(bu" 4
+agg: an aggregate function.  See \*(L"\s-1GROUPING\s0\*(R".  The default is \*(L"first\*(R".
+.IP "\(bu" 4
+aggonly: controls whether the column only shows when grouping is enabled on the
+table (see \*(L"\s-1GROUPING\s0\*(R").  By default, this is disabled.  This means columns
+will always be shown by default, whether grouping is enabled or not.  If a
+column's aggonly is set true, the column will appear when you toggle grouping on
+the table.  Several columns are set this way, such as the count column on
+\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R", so you don't see a count when the
+grouping isn't enabled, but you do when it is.
+.Sh "\s-1FILTERS\s0"
+.IX Subsection "FILTERS"
+Filters remove rows from the display.  They behave much like a \s-1WHERE\s0 clause in
+\&\s-1SQL\s0.  innotop has several built-in filters, which remove irrelevant information
+like inactive queries, but you can define your own as well.  innotop also lets
+you create quick\-filters, which do not get saved to the configuration file, and
+are just an easy way to quickly view only some rows.
+.PP
+You can enable or disable a filter on any table.  Press the '%' key (mnemonic: %
+looks kind of like a line being filtered between two circles) and choose which
+table you want to filter, if asked.  You'll then see a list of possible filters
+and a list of filters currently enabled for that table.  Type the names of
+filters you want to apply and press Enter.
+.PP
+\fIUSER-DEFINED \s-1FILTERS\s0\fR
+.IX Subsection "USER-DEFINED FILTERS"
+.PP
+If you type a name that doesn't exist, innotop will prompt you to create the
+filter.  Filters are easy to create if you know Perl, and not hard if you don't.
+What you're doing is creating a subroutine that returns true if the row should
+be displayed.  The row is a hash reference passed to your subroutine as \f(CW$set\fR.
+.PP
+For example, imagine you want to filter the processlist table so you only see
+queries that have been running more than five minutes.  Type a new name for your
+filter, and when prompted for the subroutine body, press \s-1TAB\s0 to initiate your
+terminal's auto\-completion.  You'll see the names of the columns in the
+\&\*(L"processlist\*(R" table (innotop generally tries to help you with auto-completion
+lists).  You want to filter on the 'time' column.  Type the text \*(L"$set\->{time} >
+300\*(R" to return true when the query is more than five minutes old.  That's all
+you need to do.
+.PP
+In other words, the code you're typing is surrounded by an implicit context,
+which looks like this:
+.PP
+.Vb 4
+\& sub filter {
+\&    my ( $set ) = @_;
+\&    # YOUR CODE HERE
+\& }
+.Ve
+.PP
+If your filter doesn't work, or if something else suddenly behaves differently,
+you might have made an error in your filter, and innotop is silently catching
+the error.  Try enabling \*(L"debug\*(R" to make innotop throw an error instead.
+.PP
+\fIQUICK-FILTERS\fR
+.IX Subsection "QUICK-FILTERS"
+.PP
+innotop's quick-filters are a shortcut to create a temporary filter that doesn't
+persist when you restart innotop.  To create a quick\-filter, press the '/' key.
+innotop will prompt you for the column name and filter text.  Again, you can use
+auto-completion on column names.  The filter text can be just the text you want
+to \*(L"search for.\*(R"  For example, to filter the \*(L"processlist\*(R" table on queries
+that refer to the products table, type '/' and then 'info product'.
+.PP
+The filter text can actually be any Perl regular expression, but of course a
+literal string like 'product' works fine as a regular expression.
+.PP
+Behind the scenes innotop compiles the quick-filter into a specially tagged
+filter that is otherwise like any other filter.  It just isn't saved to the
+configuration file.
+.PP
+To clear quick\-filters, press the '\e' key and innotop will clear them all at
+once.
+.Sh "\s-1SORTING\s0"
+.IX Subsection "SORTING"
+innotop has sensible built-in defaults to sort the most important rows to the
+top of the table.  Like anything else in innotop, you can customize how any
+table is sorted.
+.PP
+To start the sort dialog, start the \*(L"\s-1TABLE\s0 \s-1EDITOR\s0\*(R" with the '^' key, choose a
+table if necessary, and press the 's' key.  You'll see a list of columns you can
+use in the sort expression and the current sort expression, if any.  Enter a
+list of columns by which you want to sort and press Enter.  If you want to
+reverse sort, prefix the column name with a minus sign.  For example, if you
+want to sort by column a ascending, then column b descending, type 'a \-b'.  You
+can also explicitly add a + in front of columns you want to sort ascending, but
+it's not required.
+.PP
+Some modes have keys mapped to open this dialog directly, and to quickly reverse
+sort direction.  Press '?' as usual to see which keys are mapped in any mode.
+.Sh "\s-1GROUPING\s0"
+.IX Subsection "GROUPING"
+innotop can group, or aggregate, rows together (I use the terms
+interchangeably).  This is quite similar to an \s-1SQL\s0 \s-1GROUP\s0 \s-1BY\s0 clause.  You can
+specify to group on certain columns, or if you don't specify any, the entire set
+of rows is treated as one group.  This is quite like \s-1SQL\s0 so far, but unlike \s-1SQL\s0,
+you can also select un-grouped columns.  innotop actually aggregates every
+column.  If you don't explicitly specify a grouping function, the default is
+\&'first'.  This is basically a convenience so you don't have to specify an
+aggregate function for every column you want in the result.
+.PP
+You can quickly toggle grouping on a table with the '=' key, which toggles its
+aggregate property.  This property doesn't persist to the config file.
+.PP
+The columns by which the table is grouped are specified in its group_by
+property.  When you turn grouping on, innotop places the group_by columns at the
+far left of the table, even if they're not supposed to be visible.  The rest of
+the visible columns appear in order after them.
+.PP
+Two tables have default group_by lists and a count column built in:
+\&\*(L"processlist\*(R" and \*(L"innodb_transactions\*(R".  The grouping is by connection
+and status, so you can quickly see how many queries or transactions are in a
+given status on each server you're monitoring.  The time columns are aggregated
+as a sum; other columns are left at the default 'first' aggregation.
+.PP
+By default, the table shown in \*(L"S: Variables & Status\*(R" mode also uses
+grouping so you can monitor variables and status across many servers.  The
+default aggregation function in this mode is 'avg'.
+.PP
+Valid grouping functions are defined in the \f(CW%agg_funcs\fR hash.  They include
+.IP "first" 4
+.IX Item "first"
+Returns the first element in the group.
+.IP "count" 4
+.IX Item "count"
+Returns the number of elements in the group, including undefined elements, much
+like \s-1SQL\s0's \s-1COUNT\s0(*).
+.IP "avg" 4
+.IX Item "avg"
+Returns the average of defined elements in the group.
+.IP "sum" 4
+.IX Item "sum"
+Returns the sum of elements in the group.
+.PP
+Here's an example of grouping at work.  Suppose you have a very busy server with
+hundreds of open connections, and you want to see how many connections are in
+what status.  Using the built-in grouping rules, you can press 'Q' to enter
+\&\*(L"Q: Query List\*(R" mode.  Press '=' to toggle grouping (if necessary, select the
+\&\*(L"processlist\*(R" table when prompted).
+.PP
+Your display might now look like the following:
+.PP
+.Vb 1
+\& Query List (? for help) localhost, 32:33, 0.11 QPS, 1 thd, 5.0.38\-log
+.Ve
+.PP
+.Vb 5
+\& CXN        Cmd        Cnt  ID      User   Host           Time   Query       
+\& localhost  Query      49    12933  webusr localhost      19:38  SELECT * FROM
+\& localhost  Sending Da 23     2383  webusr localhost      12:43  SELECT col1,
+\& localhost  Sleep      120     140  webusr localhost    5:18:12
+\& localhost  Statistics 12    19213  webusr localhost      01:19  SELECT * FROM
+.Ve
+.PP
+That's actually quite a worrisome picture.  You've got a lot of idle connections
+(Sleep), and some connections executing queries (Query and Sending Data).
+That's okay, but you also have a lot in Statistics status, collectively spending
+over a minute.  That means the query optimizer is having a really hard time
+optimizing your statements.  Something is wrong; it should normally take
+milliseconds to optimize queries.  You might not have seen this pattern if you
+didn't look at your connections in aggregate.  (This is a made-up example, but
+it can happen in real life).
+.Sh "\s-1PIVOTING\s0"
+.IX Subsection "PIVOTING"
+innotop can pivot a table for more compact display, similar to a Pivot Table in
+a spreadsheet (also known as a crosstab).  Pivoting a table makes columns into
+rows.  Assume you start with this table:
+.PP
+.Vb 4
+\& foo bar
+\& === ===
+\& 1   3
+\& 2   4
+.Ve
+.PP
+After pivoting, the table will look like this:
+.PP
+.Vb 4
+\& name set0 set1
+\& ==== ==== ====
+\& foo  1    2
+\& bar  3    4
+.Ve
+.PP
+To get reasonable results, you might need to group as well as pivoting.
+innotop currently does this for \*(L"S: Variables & Status\*(R" mode.
+.Sh "\s-1COLORS\s0"
+.IX Subsection "COLORS"
+By default, innotop highlights rows with color so you can see at a glance which
+rows are more important.  You can customize the colorization rules and add your
+own to any table.  Open the table editor with the '^' key, choose a table if
+needed, and press 'o' to open the color editor dialog.
+.PP
+The color editor dialog displays the rules applied to the table, in the order
+they are evaluated.  Each row is evaluated against each rule to see if the rule
+matches the row; if it does, the row gets the specified color, and no further
+rules are evaluated.  The rules look like the following:
+.PP
+.Vb 9
+\& state  eq  Locked       black on_red
+\& cmd    eq  Sleep        white       
+\& user   eq  system user  white       
+\& cmd    eq  Connect      white       
+\& cmd    eq  Binlog Dump  white       
+\& time   >   600          red         
+\& time   >   120          yellow      
+\& time   >   60           green       
+\& time   >   30           cyan
+.Ve
+.PP
+This is the default rule set for the \*(L"processlist\*(R" table.  In order of
+priority, these rules make locked queries black on a red background, \*(L"gray out\*(R"
+connections from replication and sleeping queries, and make queries turn from
+cyan to red as they run longer.
+.PP
+(For some reason, the \s-1ANSI\s0 color code \*(L"white\*(R" is actually a light gray.  Your
+terminal's display may vary; experiment to find colors you like).
+.PP
+You can use keystrokes to move the rules up and down, which re-orders their
+priority.  You can also delete rules and add new ones.  If you add a new rule,
+innotop prompts you for the column, an operator for the comparison, a value
+against which to compare the column, and a color to assign if the rule matches.
+There is auto-completion and prompting at each step.
+.PP
+The value in the third step needs to be correctly quoted.  innotop does not try
+to quote the value because it doesn't know whether it should treat the value as
+a string or a number.  If you want to compare the column against a string, as
+for example in the first rule above, you should enter 'Locked' surrounded by
+quotes.  If you get an error message about a bareword, you probably should have
+quoted something.
+.Sh "\s-1EXPRESSIONS\s0"
+.IX Subsection "EXPRESSIONS"
+Expressions are at the core of how innotop works, and are what enables you to
+extend innotop as you wish.  Recall the table lifecycle explained in
+\&\*(L"\s-1TABLES\s0\*(R".  Expressions are used in the earliest step, where it extracts
+values from a data source to form rows.
+.PP
+It does this by calling a subroutine for each column, passing it the source data
+set, a set of current values, and a set of previous values.  These are all
+needed so the subroutine can calculate things like the difference between this
+tick and the previous tick.
+.PP
+The subroutines that extract the data from the set are compiled from
+expressions.  This gives significantly more power than just naming the values to
+fill the columns, because it allows the column's value to be calculated from
+whatever data is necessary, but avoids the need to write complicated and lengthy
+Perl code.
+.PP
+innotop begins with a string of text that can look as simple as a value's name
+or as complicated as a full-fledged Perl expression.  It looks at each
+\&'bareword' token in the string and decides whether it's supposed to be a key
+into the \f(CW$set\fR hash.  A bareword is an unquoted value that isn't already
+surrounded by code-ish things like dollar signs or curly brackets.  If innotop
+decides that the bareword isn't a function or other valid Perl code, it converts
+it into a hash access.  After the whole string is processed, innotop compiles a
+subroutine, like this:
+.PP
+.Vb 5
+\& sub compute_column_value {
+\&    my ( $set, $cur, $pre ) = @_;
+\&    my $val = # EXPANDED STRING GOES HERE
+\&    return $val;
+\& }
+.Ve
+.PP
+Here's a concrete example, taken from the header table \*(L"q_header\*(R" in \*(L"Q: Query List\*(R" mode.  This expression calculates the qps, or Queries Per Second,
+column's values, from the values returned by \s-1SHOW\s0 \s-1STATUS:\s0
+.PP
+.Vb 1
+\& Questions/Uptime_hires
+.Ve
+.PP
+innotop decides both words are barewords, and transforms this expression into
+the following Perl code:
+.PP
+.Vb 1
+\& $set\->{Questions}/$set\->{Uptime_hires}
+.Ve
+.PP
+When surrounded by the rest of the subroutine's code, this is executable Perl
+that calculates a high-resolution queries-per-second value.
+.PP
+The arguments to the subroutine are named \f(CW$set\fR, \f(CW$cur\fR, and \f(CW$pre\fR.  In most cases,
+\&\f(CW$set\fR and \f(CW$cur\fR will be the same values.  However, if \*(L"status_inc\*(R" is set, \f(CW$cur\fR
+will not be the same as \f(CW$set\fR, because \f(CW$set\fR will already contain values that are
+the incremental difference between \f(CW$cur\fR and \f(CW$pre\fR.
+.PP
+Every column in innotop is computed by subroutines compiled in the same fashion.
+There is no difference between innotop's built-in columns and user-defined
+columns.  This keeps things consistent and predictable.
+.Sh "\s-1TRANSFORMATIONS\s0"
+.IX Subsection "TRANSFORMATIONS"
+Transformations change how a value is rendered.  For example, they can take a
+number of seconds and display it in H:M:S format.  The following transformations
+are defined:
+.IP "commify" 4
+.IX Item "commify"
+Adds commas to large numbers every three decimal places.
+.IP "dulint_to_int" 4
+.IX Item "dulint_to_int"
+Accepts two unsigned integers and converts them into a single longlong.  This is
+useful for certain operations with InnoDB, which uses two integers as
+transaction identifiers, for example.
+.IP "no_ctrl_char" 4
+.IX Item "no_ctrl_char"
+Removes quoted control characters from the value.  This is affected by the
+\&\*(L"charset\*(R" configuration variable.
+.Sp
+This transformation only operates within quoted strings, for example, values to
+a \s-1SET\s0 clause in an \s-1UPDATE\s0 statement.  It will not alter the \s-1UPDATE\s0 statement,
+but will collapse the quoted string to [\s-1BINARY\s0] or [\s-1TEXT\s0], depending on the
+charset.
+.IP "percent" 4
+.IX Item "percent"
+Converts a number to a percentage by multiplying it by two, formatting it with
+\&\*(L"num_digits\*(R" digits after the decimal point, and optionally adding a percent
+sign (see \*(L"show_percent\*(R").
+.IP "secs_to_time" 4
+.IX Item "secs_to_time"
+Formats a number of seconds as time in days+hours:minutes:seconds format.
+.IP "set_precision" 4
+.IX Item "set_precision"
+Formats numbers with \*(L"num_digits\*(R" number of digits after the decimal point.
+.IP "shorten" 4
+.IX Item "shorten"
+Formats a number as a unit of 1024 (k/M/G/T) and with \*(L"num_digits\*(R" number of
+digits after the decimal point.
+.Sh "\s-1TABLE\s0 \s-1EDITOR\s0"
+.IX Subsection "TABLE EDITOR"
+The innotop table editor lets you customize tables with keystrokes.  You start
+the table editor with the '^' key.  If there's more than one table on the
+screen, it will prompt you to choose one of them.  Once you do, innotop will
+show you something like this:
+.PP
+.Vb 1
+\& Editing table definition for Buffer Pool.  Press ? for help, q to quit.
+.Ve
+.PP
+.Vb 9
+\& name               hdr          label                  src          
+\& cxn                CXN          Connection from which  cxn          
+\& buf_pool_size      Size         Buffer pool size       IB_bp_buf_poo
+\& buf_free           Free Bufs    Buffers free in the b  IB_bp_buf_fre
+\& pages_total        Pages        Pages total            IB_bp_pages_t
+\& pages_modified     Dirty Pages  Pages modified (dirty  IB_bp_pages_m
+\& buf_pool_hit_rate  Hit Rate     Buffer pool hit rate   IB_bp_buf_poo
+\& total_mem_alloc    Memory       Total memory allocate  IB_bp_total_m
+\& add_pool_alloc     Add\(aql Pool   Additonal pool alloca  IB_bp_add_poo
+.Ve
+.PP
+The first line shows which table you're editing, and reminds you again to press
+\&'?' for a list of key mappings.  The rest is a tabular representation of the
+table's columns, because that's likely what you're trying to edit.  However, you
+can edit more than just the table's columns; this screen can start the filter
+editor, color rule editor, and more.
+.PP
+Each row in the display shows a single column in the table you're editing, along
+with a couple of its properties such as its header and source expression (see
+\&\*(L"\s-1EXPRESSIONS\s0\*(R").
+.PP
+The key mappings are Vim\-style, as in many other places.  Pressing 'j' and 'k'
+moves the highlight up or down.  You can then (d)elete or (e)dit the highlighted
+column.  You can also (a)dd a column to the table.  This actually just activates
+one of the columns already defined for the table; it prompts you to choose from
+among the columns available but not currently displayed.  Finally, you can
+re-order the columns with the '+' and '\-' keys.
+.PP
+You can do more than just edit the columns with the table editor, you can also
+edit other properties, such as the table's sort expression and group-by
+expression.  Press '?' to see the full list, of course.
+.PP
+If you want to really customize and create your own column, as opposed to just
+activating a built-in one that's not currently displayed, press the (n)ew key,
+and innotop will prompt you for the information it needs:
+.IP "\(bu" 4
+The column name: this needs to be a word without any funny characters, e.g. just
+letters, numbers and underscores.
+.IP "\(bu" 4
+The column header: this is the label that appears at the top of the column, in
+the table header.  This can have spaces and funny characters, but be careful not
+to make it too wide and waste space on\-screen.
+.IP "\(bu" 4
+The column's data source: this is an expression that determines what data from
+the source (see \*(L"\s-1TABLES\s0\*(R") innotop will put into the column.  This can just be
+the name of an item in the source, or it can be a more complex expression, as
+described in \*(L"\s-1EXPRESSIONS\s0\*(R".
+.PP
+Once you've entered the required data, your table has a new column.  There is no
+difference between this column and the built-in ones; it can have all the same
+properties and behaviors.  innotop will write the column's definition to the
+configuration file, so it will persist across sessions.
+.PP
+Here's an example: suppose you want to track how many times your slaves have
+retried transactions.  According to the MySQL manual, the
+Slave_retried_transactions status variable gives you that data: \*(L"The total
+number of times since startup that the replication slave \s-1SQL\s0 thread has retried
+transactions. This variable was added in version 5.0.4.\*(R"  This is appropriate to
+add to the \*(L"slave_sql_status\*(R" table.
+.PP
+To add the column, switch to the replication-monitoring mode with the 'M' key,
+and press the '^' key to start the table editor.  When prompted, choose
+slave_sql_status as the table, then press 'n' to create the column.  Type
+\&'retries' as the column name, 'Retries' as the column header, and
+\&'Slave_retried_transactions' as the source.  Now the column is created, and you
+see the table editor screen again.  Press 'q' to exit the table editor, and
+you'll see your column at the end of the table.
+.SH "VARIABLE SETS"
+.IX Header "VARIABLE SETS"
+Variable sets are used in \*(L"S: Variables & Status\*(R" mode to define more easily
+what variables you want to monitor.  Behind the scenes they are compiled to a
+list of expressions, and then into a column list so they can be treated just
+like columns in any other table, in terms of data extraction and
+transformations.  However, you're protected from the tedious details by a syntax
+that ought to feel very natural to you: a \s-1SQL\s0 \s-1SELECT\s0 list.
+.PP
+The data source for variable sets, and indeed the entire S mode, is the
+combination of \s-1SHOW\s0 \s-1STATUS\s0, \s-1SHOW\s0 \s-1VARIABLES\s0, and \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.  Imagine
+that you had a huge table with one column per variable returned from those
+statements.  That's the data source for variable sets.  You can now query this
+data source just like you'd expect.  For example:
+.PP
+.Vb 1
+\& Questions, Uptime, Questions/Uptime as QPS
+.Ve
+.PP
+Behind the scenes innotop will split that variable set into three expressions,
+compile them and turn them into a table definition, then extract as usual.  This
+becomes a \*(L"variable set,\*(R" or a \*(L"list of variables you want to monitor.\*(R"
+.PP
+innotop lets you name and save your variable sets, and writes them to the
+configuration file.  You can choose which variable set you want to see with the
+\&'c' key, or activate the next and previous sets with the '>' and '<' keys.
+There are many built-in variable sets as well, which should give you a good
+start for creating your own.  Press 'e' to edit the current variable set, or
+just to see how it's defined.  To create a new one, just press 'c' and type its
+name.
+.PP
+You may want to use some of the functions listed in \*(L"\s-1TRANSFORMATIONS\s0\*(R" to help
+format the results.  In particular, \*(L"set_precision\*(R" is often useful to limit
+the number of digits you see.  Extending the above example, here's how:
+.PP
+.Vb 1
+\& Questions, Uptime, set_precision(Questions/Uptime) as QPS
+.Ve
+.PP
+Actually, this still needs a little more work.  If your \*(L"interval\*(R" is less
+than one second, you might be dividing by zero because Uptime is incremental in
+this mode by default.  Instead, use Uptime_hires:
+.PP
+.Vb 1
+\& Questions, Uptime, set_precision(Questions/Uptime_hires) as QPS
+.Ve
+.PP
+This example is simple, but it shows how easy it is to choose which variables
+you want to monitor.
+.SH "PLUGINS"
+.IX Header "PLUGINS"
+innotop has a simple but powerful plugin mechanism by which you can extend
+or modify its existing functionality, and add new functionality.  innotop's
+plugin functionality is event\-based: plugins register themselves to be called
+when events happen.  They then have a chance to influence the event.
+.PP
+An innotop plugin is a Perl module placed in innotop's \*(L"plugin_dir\*(R"
+directory.  On \s-1UNIX\s0 systems, you can place a symbolic link to the module instead
+of putting the actual file there.  innotop automatically discovers the file.  If
+there is a corresponding entry in the \*(L"plugins\*(R" configuration file section,
+innotop loads and activates the plugin.
+.PP
+The module must conform to innotop's plugin interface.  Additionally, the source
+code of the module must be written in such a way that innotop can inspect the
+file and determine the package name and description.
+.Sh "Package Source Convention"
+.IX Subsection "Package Source Convention"
+innotop inspects the plugin module's source to determine the Perl package name.
+It looks for a line of the form \*(L"package Foo;\*(R" and if found, considers the
+plugin's package name to be Foo.  Of course the package name can be a valid Perl
+package name, with double semicolons and so on.
+.PP
+It also looks for a description in the source code, to make the plugin editor
+more human\-friendly.  The description is a comment line of the form \*(L"#
+description: Foo\*(R", where \*(L"Foo\*(R" is the text innotop will consider to be the
+plugin's description.
+.Sh "Plugin Interface"
+.IX Subsection "Plugin Interface"
+The innotop plugin interface is quite simple: innotop expects the plugin to be
+an object-oriented module it can call certain methods on.  The methods are
+.IP "new(%variables)" 4
+.IX Item "new(%variables)"
+This is the plugin's constructor.  It is passed a hash of innotop's variables,
+which it can manipulate (see \*(L"Plugin Variables\*(R").  It must return a reference
+to the newly created plugin object.
+.Sp
+At construction time, innotop has only loaded the general configuration and
+created the default built-in variables with their default contents (which is
+quite a lot).  Therefore, the state of the program is exactly as in the innotop
+source code, plus the configuration variables from the \*(L"general\*(R" section in
+the config file.
+.Sp
+If your plugin manipulates the variables, it is changing global data, which is
+shared by innotop and all plugins.  Plugins are loaded in the order they're
+listed in the config file.  Your plugin may load before or after another plugin,
+so there is a potential for conflict or interaction between plugins if they
+modify data other plugins use or modify.
+.IP "\fIregister_for_events()\fR" 4
+.IX Item "register_for_events()"
+This method must return a list of events in which the plugin is interested, if
+any.  See \*(L"Plugin Events\*(R" for the defined events.  If the plugin returns an
+event that's not defined, the event is ignored.
+.IP "event handlers" 4
+.IX Item "event handlers"
+The plugin must implement a method named the same as each event for which it has
+registered.  In other words, if the plugin returns qw(foo bar) from
+\&\fIregister_for_events()\fR, it must have \fIfoo()\fR and \fIbar()\fR methods.  These methods are
+callbacks for the events.  See \*(L"Plugin Events\*(R" for more details about each
+event.
+.Sh "Plugin Variables"
+.IX Subsection "Plugin Variables"
+The plugin's constructor is passed a hash of innotop's variables, which it can
+manipulate.  It is probably a good idea if the plugin object saves a copy of it
+for later use.  The variables are defined in the innotop variable
+\&\f(CW%pluggable_vars\fR, and are as follows:
+.IP "action_for" 4
+.IX Item "action_for"
+A hashref of key mappings.  These are innotop's global hot\-keys.
+.IP "agg_funcs" 4
+.IX Item "agg_funcs"
+A hashref of functions that can be used for grouping.  See \*(L"\s-1GROUPING\s0\*(R".
+.IP "config" 4
+.IX Item "config"
+The global configuration hash.
+.IP "connections" 4
+.IX Item "connections"
+A hashref of connection specifications.  These are just specifications of how to
+connect to a server.
+.IP "dbhs" 4
+.IX Item "dbhs"
+A hashref of innotop's database connections.  These are actual \s-1DBI\s0 connection
+objects.
+.IP "filters" 4
+.IX Item "filters"
+A hashref of filters applied to table rows.  See \*(L"\s-1FILTERS\s0\*(R" for more.
+.IP "modes" 4
+.IX Item "modes"
+A hashref of modes.  See \*(L"\s-1MODES\s0\*(R" for more.
+.IP "server_groups" 4
+.IX Item "server_groups"
+A hashref of server groups.  See \*(L"\s-1SERVER\s0 \s-1GROUPS\s0\*(R".
+.IP "tbl_meta" 4
+.IX Item "tbl_meta"
+A hashref of innotop's table meta\-data, with one entry per table (see
+\&\*(L"\s-1TABLES\s0\*(R" for more information).
+.IP "trans_funcs" 4
+.IX Item "trans_funcs"
+A hashref of transformation functions.  See \*(L"\s-1TRANSFORMATIONS\s0\*(R".
+.IP "var_sets" 4
+.IX Item "var_sets"
+A hashref of variable sets.  See \*(L"\s-1VARIABLE\s0 \s-1SETS\s0\*(R".
+.Sh "Plugin Events"
+.IX Subsection "Plugin Events"
+Each event is defined somewhere in the innotop source code.  When innotop runs
+that code, it executes the callback function for each plugin that expressed its
+interest in the event.  innotop passes some data for each event.  The events are
+defined in the \f(CW%event_listener_for\fR variable, and are as follows:
+.ie n .IP "extract_values($set, $cur\fR, \f(CW$pre\fR, \f(CW$tbl)" 4
+.el .IP "extract_values($set, \f(CW$cur\fR, \f(CW$pre\fR, \f(CW$tbl\fR)" 4
+.IX Item "extract_values($set, $cur, $pre, $tbl)"
+This event occurs inside the function that extracts values from a data source.
+The arguments are the set of values, the current values, the previous values,
+and the table name.
+.IP "set_to_tbl" 4
+.IX Item "set_to_tbl"
+Events are defined at many places in this subroutine, which is responsible for
+turning an arrayref of hashrefs into an arrayref of lines that can be printed to
+the screen.  The events all pass the same data: an arrayref of rows and the name
+of the table being created.  The events are set_to_tbl_pre_filter,
+set_to_tbl_pre_sort,set_to_tbl_pre_group, set_to_tbl_pre_colorize,
+set_to_tbl_pre_transform, set_to_tbl_pre_pivot, set_to_tbl_pre_create,
+set_to_tbl_post_create.
+.IP "draw_screen($lines)" 4
+.IX Item "draw_screen($lines)"
+This event occurs inside the subroutine that prints the lines to the screen.
+\&\f(CW$lines\fR is an arrayref of strings.
+.Sh "Simple Plugin Example"
+.IX Subsection "Simple Plugin Example"
+The easiest way to explain the plugin functionality is probably with a simple
+example.  The following module adds a column to the beginning of every table and
+sets its value to 1.
+.PP
+.Vb 2
+\& use strict;
+\& use warnings FATAL => \(aqall\(aq;
+.Ve
+.PP
+.Vb 2
+\& package Innotop::Plugin::Example;
+\& # description: Adds an \(aqexample\(aq column to every table
+.Ve
+.PP
+.Vb 4
+\& sub new {
+\&    my ( $class, %vars ) = @_;
+\&    # Store reference to innotop\(aqs variables in $self
+\&    my $self = bless { %vars }, $class;
+.Ve
+.PP
+.Vb 11
+\&    # Design the example column
+\&    my $col = {
+\&       hdr   => \(aqExample\(aq,
+\&       just  => \(aq\(aq,
+\&       dec   => 0,
+\&       num   => 1,
+\&       label => \(aqExample\(aq,
+\&       src   => \(aqexample\(aq, # Get data from this column in the data source
+\&       tbl   => \(aq\(aq,
+\&       trans => [],
+\&    };
+.Ve
+.PP
+.Vb 8
+\&    # Add the column to every table.
+\&    my $tbl_meta = $vars{tbl_meta};
+\&    foreach my $tbl ( values %$tbl_meta ) {
+\&       # Add the column to the list of defined columns
+\&       $tbl\->{cols}\->{example} = $col;
+\&       # Add the column to the list of visible columns
+\&       unshift @{$tbl\->{visible}}, \(aqexample\(aq;
+\&    }
+.Ve
+.PP
+.Vb 3
+\&    # Be sure to return a reference to the object.
+\&    return $self;
+\& }
+.Ve
+.PP
+.Vb 5
+\& # I\(aqd like to be called when a data set is being rendered into a table, please.
+\& sub register_for_events {
+\&    my ( $self ) = @_;
+\&    return qw(set_to_tbl_pre_filter);
+\& }
+.Ve
+.PP
+.Vb 8
+\& # This method will be called when the event fires.
+\& sub set_to_tbl_pre_filter {
+\&    my ( $self, $rows, $tbl ) = @_;
+\&    # Set the example column\(aqs data source to the value 1.
+\&    foreach my $row ( @$rows ) {
+\&       $row\->{example} = 1;
+\&    }
+\& }
+.Ve
+.PP
+.Vb 1
+\& 1;
+.Ve
+.Sh "Plugin Editor"
+.IX Subsection "Plugin Editor"
+The plugin editor lets you view the plugins innotop discovered and activate or
+deactivate them.  Start the editor by pressing $ to start the configuration
+editor from any mode.  Press the 'p' key to start the plugin editor.  You'll see
+a list of plugins innotop discovered.  You can use the 'j' and 'k' keys to move
+the highlight to the desired one, then press the * key to toggle it active or
+inactive.  Exit the editor and restart innotop for the changes to take effect.
+.SH "SQL STATEMENTS"
+.IX Header "SQL STATEMENTS"
+innotop uses a limited set of \s-1SQL\s0 statements to retrieve data from MySQL for
+display.  The statements are customized depending on the server version against
+which they are executed; for example, on MySQL 5 and newer, \s-1INNODB_STATUS\s0
+executes \*(L"\s-1SHOW\s0 \s-1ENGINE\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R", while on earlier versions it executes
+\&\*(L"\s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0\*(R".  The statements are as follows:
+.PP
+.Vb 12
+\& Statement           SQL executed
+\& =================== ===============================
+\& INNODB_STATUS       SHOW [ENGINE] INNODB STATUS
+\& KILL_CONNECTION     KILL
+\& KILL_QUERY          KILL QUERY
+\& OPEN_TABLES         SHOW OPEN TABLES
+\& PROCESSLIST         SHOW FULL PROCESSLIST
+\& SHOW_MASTER_LOGS    SHOW MASTER LOGS
+\& SHOW_MASTER_STATUS  SHOW MASTER STATUS
+\& SHOW_SLAVE_STATUS   SHOW SLAVE STATUS
+\& SHOW_STATUS         SHOW [GLOBAL] STATUS
+\& SHOW_VARIABLES      SHOW [GLOBAL] VARIABLES
+.Ve
+.SH "DATA SOURCES"
+.IX Header "DATA SOURCES"
+Each time innotop extracts values to create a table (see \*(L"\s-1EXPRESSIONS\s0\*(R" and
+\&\*(L"\s-1TABLES\s0\*(R"), it does so from a particular data source.  Largely because of the
+complex data extracted from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0, this is slightly messy.  \s-1SHOW\s0
+\&\s-1INNODB\s0 \s-1STATUS\s0 contains a mixture of single values and repeated values that form
+nested data sets.
+.PP
+Whenever innotop fetches data from MySQL, it adds two extra bits to each set:
+cxn and Uptime_hires.  cxn is the name of the connection from which the data
+came.  Uptime_hires is a high-resolution version of the server's Uptime status
+variable, which is important if your \*(L"interval\*(R" setting is sub\-second.
+.PP
+Here are the kinds of data sources from which data is extracted:
+.IP "\s-1STATUS_VARIABLES\s0" 4
+.IX Item "STATUS_VARIABLES"
+This is the broadest category, into which the most kinds of data fall.  It
+begins with the combination of \s-1SHOW\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1VARIABLES\s0, but other sources
+may be included as needed, for example, \s-1SHOW\s0 \s-1MASTER\s0 \s-1STATUS\s0 and \s-1SHOW\s0 \s-1SLAVE\s0
+\&\s-1STATUS\s0, as well as many of the non-repeated values from \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.
+.IP "\s-1DEADLOCK_LOCKS\s0" 4
+.IX Item "DEADLOCK_LOCKS"
+This data is extracted from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0
+section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.  It is nested two levels deep: transactions, then
+locks.
+.IP "\s-1DEADLOCK_TRANSACTIONS\s0" 4
+.IX Item "DEADLOCK_TRANSACTIONS"
+This data is from the transaction list in the \s-1LATEST\s0 \s-1DETECTED\s0 \s-1DEADLOCK\s0
+section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.  It is nested one level deep.
+.IP "\s-1EXPLAIN\s0" 4
+.IX Item "EXPLAIN"
+This data is from the result set returned by \s-1EXPLAIN\s0.
+.IP "\s-1INNODB_TRANSACTIONS\s0" 4
+.IX Item "INNODB_TRANSACTIONS"
+This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0.
+.IP "\s-1IO_THREADS\s0" 4
+.IX Item "IO_THREADS"
+This data is from the list of threads in the the \s-1FILE\s0 I/O section of \s-1SHOW\s0 \s-1INNODB\s0
+\&\s-1STATUS\s0.
+.IP "\s-1INNODB_LOCKS\s0" 4
+.IX Item "INNODB_LOCKS"
+This data is from the \s-1TRANSACTIONS\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested
+two levels deep.
+.IP "\s-1OPEN_TABLES\s0" 4
+.IX Item "OPEN_TABLES"
+This data is from \s-1SHOW\s0 \s-1OPEN\s0 \s-1TABLES\s0.
+.IP "\s-1PROCESSLIST\s0" 4
+.IX Item "PROCESSLIST"
+This data is from \s-1SHOW\s0 \s-1FULL\s0 \s-1PROCESSLIST\s0.
+.IP "\s-1OS_WAIT_ARRAY\s0" 4
+.IX Item "OS_WAIT_ARRAY"
+This data is from the \s-1SEMAPHORES\s0 section of \s-1SHOW\s0 \s-1INNODB\s0 \s-1STATUS\s0 and is nested one
+level deep.  It comes from the lines that look like this:
+.Sp
+.Vb 1
+\& \-\-Thread 1568861104 has waited at btr0cur.c line 424 ....
+.Ve
+.SH "MYSQL PRIVILEGES"
+.IX Header "MYSQL PRIVILEGES"
+.IP "\(bu" 4
+You must connect to MySQL as a user who has the \s-1SUPER\s0 privilege for many of the
+functions.
+.IP "\(bu" 4
+If you don't have the \s-1SUPER\s0 privilege, you can still run some functions, but you
+won't necessarily see all the same data.
+.IP "\(bu" 4
+You need the \s-1PROCESS\s0 privilege to see the list of currently running queries in Q
+mode.
+.IP "\(bu" 4
+You need special privileges to start and stop slave servers.
+.IP "\(bu" 4
+You need appropriate privileges to create and drop the deadlock tables if needed
+(see \*(L"\s-1SERVER\s0 \s-1CONNECTIONS\s0\*(R").
+.SH "SYSTEM REQUIREMENTS"
+.IX Header "SYSTEM REQUIREMENTS"
+You need Perl to run innotop, of course.  You also need a few Perl modules: \s-1DBI\s0,
+DBD::mysql,  Term::ReadKey, and Time::HiRes.  These should be included with most
+Perl distributions, but in case they are not, I recommend using versions
+distributed with your operating system or Perl distribution, not from \s-1CPAN\s0.
+Term::ReadKey in particular has been known to cause problems if installed from
+\&\s-1CPAN\s0.
+.PP
+If you have Term::ANSIColor, innotop will use it to format headers more readably
+and compactly.  (Under Microsoft Windows, you also need Win32::Console::ANSI for
+terminal formatting codes to be honored).  If you install Term::ReadLine,
+preferably Term::ReadLine::Gnu, you'll get nice auto-completion support.
+.PP
+I run innotop on Gentoo GNU/Linux, Debian and Ubuntu, and I've had feedback from
+people successfully running it on Red Hat, CentOS, Solaris, and Mac \s-1OSX\s0.  I
+don't see any reason why it won't work on other UNIX-ish operating systems, but
+I don't know for sure.  It also runs on Windows under ActivePerl without
+problem.
+.PP
+I use innotop on MySQL versions 3.23.58, 4.0.27, 4.1.0, 4.1.22, 5.0.26, 5.1.15,
+and 5.2.3.  If it doesn't run correctly for you, that is a bug and I hope you
+report it.
+.SH "FILES"
+.IX Header "FILES"
+$HOMEDIR/.innotop is used to store configuration information.  Files include the
+configuration file innotop.ini, the core_dump file which contains verbose error
+messages if \*(L"debug\*(R" is enabled, and the plugins/ subdirectory.
+.SH "GLOSSARY OF TERMS"
+.IX Header "GLOSSARY OF TERMS"
+.IP "tick" 4
+.IX Item "tick"
+A tick is a refresh event, when innotop re-fetches data from connections and
+displays it.
+.SH "ACKNOWLEDGEMENTS"
+.IX Header "ACKNOWLEDGEMENTS"
+I'm grateful to the following people for various reasons, and hope I haven't
+forgotten to include anyone:
+.PP
+Allen K. Smith,
+Aurimas Mikalauskas,
+Bartosz Fenski,
+Brian Miezejewski,
+Christian Hammers, 
+Cyril Scetbon,
+Dane Miller,
+David Multer,
+Dr. Frank Ullrich,
+Giuseppe Maxia,
+Google.com Site Reliability Engineers,
+Jan Pieter Kunst,
+Jari Aalto,
+Jay Pipes,
+Jeremy Zawodny,
+Johan Idren,
+Kristian Kohntopp,
+Lenz Grimmer,
+Maciej Dobrzanski,
+Michiel Betel,
+MySQL \s-1AB\s0,
+Paul McCullagh,
+Sebastien Estienne,
+Sourceforge.net,
+Steven Kreuzer,
+The Gentoo MySQL Team,
+Trevor Price,
+Yaar Schnitman,
+and probably more people I've neglected to include.
+.PP
+(If I misspelled your name, it's probably because I'm afraid of putting
+international characters into this documentation; earlier versions of Perl might
+not be able to compile it then).
+.SH "COPYRIGHT, LICENSE AND WARRANTY"
+.IX Header "COPYRIGHT, LICENSE AND WARRANTY"
+This program is copyright (c) 2006 Baron Schwartz.
+Feedback and improvements are welcome.
+.PP
+\&\s-1THIS\s0 \s-1PROGRAM\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0
+\&\s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0
+\&\s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.
+.PP
+This program is free software; you can redistribute it and/or modify it under
+the terms of the \s-1GNU\s0 General Public License as published by the Free Software
+Foundation, version 2; \s-1OR\s0 the Perl Artistic License.  On \s-1UNIX\s0 and similar
+systems, you can issue `man perlgpl' or `man perlartistic' to read these
+licenses.
+.PP
+You should have received a copy of the \s-1GNU\s0 General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, \s-1MA\s0  02111\-1307  \s-1USA\s0.
+.PP
+Execute innotop and press '!' to see this information at any time.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Baron Schwartz.
+.SH "BUGS"
+.IX Header "BUGS"
+You can report bugs, ask for improvements, and get other help and support at
+<http://sourceforge.net/projects/innotop>.  There are mailing lists, forums,
+a bug tracker, etc.  Please use these instead of contacting me directly, as it
+makes my job easier and benefits others if the discussions are permanent and
+public.  Of course, if you need to contact me in private, please do.

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqlbug.1
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqlbug.1	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqlbug.1	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,14 @@
+.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database"
+.SH NAME
+mysqlbug \- MySQL bug reporting tool.
+.SH SYNOPSIS
+mysqlbug [options]
+.SH DESCRIPTION
+Interactive bug reporting tool. Use reportbug on Debian systems.
+.SH "SEE ALSO"
+mysql (1), mysqld (1)
+.SH AUTHOR
+This manpage was written by Christian Hammers <ch at debian.org>.
+
+MySQL is available at http://www.mysql.com/.
+.\" end of man page

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqldumpslow.1
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqldumpslow.1	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/manpages/mysqldumpslow.1	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,50 @@
+.TH mysql 1 "17 March 2003" "MySQL 3.23" "MySQL database"
+.SH NAME
+mysqldumpslow \- Parse and summarize the MySQL slow query log.
+.SH SYNOPSIS
+mysqldumpslow [options]
+.SH DESCRIPTION
+This program parses and summarizes a 'slow query log'.
+
+.TP
+\fB\-v\fR 
+verbose
+.TP
+\fB\-d\fR 
+debug
+.TP
+\fB\-s=WORD\fR 
+what to sort by (t, at, l, al, r, ar etc)
+.TP
+\fB\-r\fR  
+reverse the sort order (largest last instead of first)
+.TP
+\fB\-t=NUMBER\fR 
+just show the top n queries
+.TP
+\fB\-a\fR  
+don't abstract all numbers to N and strings to 'S'
+.TP
+\fB\-n=NUMBER\fR
+abstract numbers with at least n digits within names
+.TP
+\fB\-g=WORD\fR 
+grep: only consider stmts that include this string
+.TP
+\fB\-h=WORD\fR
+hostname of db server for *-slow.log filename (can be wildcard)
+.TP
+\fB\-i=WORD\fR 
+name of server instance (if using mysql.server startup script)
+.TP
+\fB\-l\fR  
+don't subtract lock time from total time
+
+.SH "SEE ALSO"
+mysql (1), mysqld (1)
+.SH AUTHOR
+This manpage was written by Christian Hammers <ch at debian.org> based on
+the commends in the code.
+
+MySQL is available at http://www.mysql.com/.
+.\" end of man page

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/my.cnf
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/my.cnf	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/my.cnf	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,150 @@
+#
+# The MySQL database server configuration file.
+#
+# You can copy this to one of:
+# - "/etc/mysql/my.cnf" to set global options,
+# - "~/.my.cnf" to set user-specific options.
+# 
+# One can use all long options that the program supports.
+# Run program with --help to get a list of available options and with
+# --print-defaults to see which it would actually understand and use.
+#
+# For explanations see
+# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
+
+# This will be passed to all mysql clients
+# It has been reported that passwords should be enclosed with ticks/quotes
+# escpecially if they contain "#" chars...
+# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
+[client]
+port		= 3306
+socket		= /var/run/mysqld/mysqld.sock
+
+# Here is entries for some specific programs
+# The following values assume you have at least 32M ram
+
+# This was formally known as [safe_mysqld]. Both versions are currently parsed.
+[mysqld_safe]
+socket		= /var/run/mysqld/mysqld.sock
+nice		= 0
+
+[mysqld]
+#
+# * Basic Settings
+#
+user		= mysql
+pid-file	= /var/run/mysqld/mysqld.pid
+socket		= /var/run/mysqld/mysqld.sock
+port		= 3306
+basedir		= /usr
+datadir		= /var/lib/mysql
+tmpdir		= /tmp
+language	= /usr/share/mysql/english
+skip-external-locking
+#
+# Instead of skip-networking the default is now to listen only on
+# localhost which is more compatible and is not less secure.
+bind-address		= 127.0.0.1
+#
+# * Fine Tuning
+#
+key_buffer		= 16M
+max_allowed_packet	= 16M
+thread_stack		= 128K
+thread_cache_size	= 8
+# This replaces the startup script and checks MyISAM tables if needed
+# the first time they are touched
+myisam-recover		= BACKUP
+#max_connections        = 100
+#table_cache            = 64
+#thread_concurrency     = 10
+#
+# * Query Cache Configuration
+#
+query_cache_limit       = 1M
+query_cache_size        = 16M
+#
+# * Logging and Replication
+#
+# Both location gets rotated by the cronjob.
+# Be aware that this log type is a performance killer.
+#log		= /var/log/mysql/mysql.log
+#
+# Error logging goes to syslog. This is a Debian improvement :)
+#
+# Here you can see queries with especially long duration
+#log_slow_queries	= /var/log/mysql/mysql-slow.log
+#long_query_time = 2
+#log-queries-not-using-indexes
+#
+# The following can be used as easy to replay backup logs or for replication.
+# note: if you are setting up a replication slave, see README.Debian about
+#       other settings you may need to change.
+#server-id		= 1
+#log_bin			= /var/log/mysql/mysql-bin.log
+expire_logs_days	= 10
+max_binlog_size         = 100M
+#binlog_do_db		= include_database_name
+#binlog_ignore_db	= include_database_name
+#
+# * BerkeleyDB
+#
+# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
+skip-bdb
+#
+# * InnoDB
+#
+# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
+# Read the manual for more InnoDB related options. There are many!
+# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
+#skip-innodb
+#
+# * Federated
+#
+# The FEDERATED storage engine is disabled since 5.0.67 by default in the .cnf files
+# shipped with MySQL distributions (my-huge.cnf, my-medium.cnf, and so forth).
+#
+skip-federated
+#
+# * Security Features
+#
+# Read the manual, too, if you want chroot!
+# chroot = /var/lib/mysql/
+#
+# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
+#
+# ssl-ca=/etc/mysql/cacert.pem
+# ssl-cert=/etc/mysql/server-cert.pem
+# ssl-key=/etc/mysql/server-key.pem
+
+
+
+[mysqldump]
+quick
+quote-names
+max_allowed_packet	= 16M
+
+[mysql]
+#no-auto-rehash	# faster start of mysql but no tab completition
+
+[isamchk]
+key_buffer		= 16M
+
+#
+# * NDB Cluster
+#
+# See /usr/share/doc/mysql-server-*/README.Debian for more information.
+#
+# The following configuration is read by the NDB Data Nodes (ndbd processes)
+# not from the NDB Management Nodes (ndb_mgmd processes).
+#
+# [MYSQL_CLUSTER]
+# ndb-connectstring=127.0.0.1
+
+
+#
+# * IMPORTANT: Additional settings that can override those from this file!
+#   The files must end with '.cnf', otherwise they'll be ignored.
+#
+!includedir /etc/mysql/conf.d/
+

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/mysql-server.lintian-overrides
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/mysql-server.lintian-overrides	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/mysql-server.lintian-overrides	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+W: mysql-dfsg source: maintainer-script-lacks-debhelper-token debian/mysql-server.postinst
+W: mysql-server: possible-bashism-in-maintainer-script postinst:68 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}'

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,1151 @@
+#!/usr/bin/perl -w
+
+# mysqlreport v3.4a Jan 23 2008 
+# http://hackmysql.com/mysqlreport
+
+# mysqlreport makes an easy-to-read report of important MySQL status values.
+# Copyright 2006-2008 Daniel Nichter
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# The GNU General Public License is available at:
+# http://www.gnu.org/copyleft/gpl.html
+
+use strict;
+use File::Temp qw(tempfile);
+use DBI;
+use Getopt::Long;
+eval { require Term::ReadKey; };
+my $RK = ($@ ? 0 : 1);
+
+sub have_op;
+
+my $WIN = ($^O eq 'MSWin32' ? 1 : 0);
+my %op;
+my %mycnf; # ~/.my.cnf
+my ($tmpfile_fh, $tmpfile);
+my ($stat_name, $stat_val, $stat_label);
+my ($major, $minor, $patch, $x); # MySQL version
+my (%stats, %vars); # SHOW STATUS, SHOW VARIABLES
+my (%DMS_vals, %Com_vals, %ib_vals);
+my ($dbh, $query);
+my ($questions, $key_read_ratio, $key_write_ratio, $dms, $slow_query_t);
+my ($key_cache_block_size, $key_buffer_used, $key_buffer_usage);
+my ($qc_mem_used, $qc_hi_r, $qc_ip_r); # Query Cache
+my $have_innodb_vals;
+my ($ib_bp_used, $ib_bp_total, $ib_bp_read_ratio);
+my ($relative_live, $relative_infiles);
+my $real_uptime;
+my (%stats_present, %stats_past); # For relative reports
+      
+GetOptions (
+   \%op,
+   "user=s",
+   "password:s",
+   "host=s",
+   "port=s",
+   "socket=s",
+   "no-mycnf",
+   "infile|in=s",
+   "outfile=s",
+   "flush-status",
+   "email=s",
+   "r|relative:i",
+   "c|report-count=i",
+   "detach",
+   "help|?",
+   "debug"
+);
+
+show_help_and_exit() if $op{'help'};
+
+get_user_mycnf() unless $op{'no-mycnf'};
+
+# Command line options override ~/.my.cnf
+$mycnf{'host'}   = $op{'host'}   if have_op 'host';
+$mycnf{'port'}   = $op{'port'}   if have_op 'port';
+$mycnf{'socket'} = $op{'socket'} if have_op 'socket'; 
+$mycnf{'user'}   = $op{'user'}   if have_op 'user';
+
+$mycnf{'user'} ||= $ENV{'USER'};
+
+if(exists $op{'password'})
+{
+   if($op{'password'} eq '') # Prompt for password
+   {
+      Term::ReadKey::ReadMode(2) if $RK;
+      print "Password for database user $mycnf{'user'}: ";
+      chomp($mycnf{'pass'} = <STDIN>);
+      Term::ReadKey::ReadMode(0), print "\n" if $RK;
+   }
+   else { $mycnf{'pass'} = $op{'password'}; } # Use password given on command line
+}
+
+$op{'com'} ||= 3;
+$op{'c'}   ||= 1; # Used in collect_reports() if --r given integer value
+
+if(defined $op{'r'})
+{
+   if($op{r}) { $relative_live    = 1; }
+   else       { $relative_infiles = 1; }
+}
+
+# The report is written to a tmp file first.
+# Later it will be moved to $op{'outfile'} or emailed $op{'email'} if needed.
+($tmpfile_fh, $tmpfile) = tempfile() or die("Cannot open temporary file for writing: $!\n");
+
+if($op{'detach'})
+{
+   $SIG{'TERM'} = 'sig_handler';
+
+   if(fork())
+   {
+      print "mysqlreport has forked and detached.\n";
+      print "While running detached, mysqlreport writes reports to '$tmpfile'.\n";
+
+      exit;
+   }
+
+   open(STDIN, "</dev/null");
+   open(STDOUT, "> $tmpfile") or die "Cannot dup STDOUT: $!\n";
+   open(STDERR, "> $tmpfile") or die "Cannot dup STDERR: $!\n";
+}
+
+select $tmpfile_fh;
+$| = 1 if ($op{'detach'} || $relative_live);
+
+# Connect to MySQL
+if(!$op{'infile'} && !$relative_infiles)
+{
+   my $dsn;
+
+   if($mycnf{'socket'} && -S $mycnf{'socket'})
+   {
+      $dsn = "DBI:mysql:mysql_socket=$mycnf{socket}";
+   }
+   elsif($mycnf{'host'})
+   {
+      $dsn = "DBI:mysql:host=$mycnf{host}" . ($mycnf{port} ? ";port=$mycnf{port}" : "");
+   }
+   else
+   {
+      $dsn = "DBI:mysql:host=localhost";
+   }
+
+   if($op{debug})
+   {
+      print "DBI DSN: $dsn\n";
+   }
+
+   $dbh = DBI->connect($dsn, $mycnf{'user'}, $mycnf{'pass'}) or die;
+}
+
+$have_innodb_vals = 1; # This might be set to 0 later in get_MySQL_version()
+
+if(defined $op{'r'})
+{
+   if($relative_live)
+   { 
+      print STDERR "mysqlreport is writing relative reports to '$tmpfile'.\n" unless $op{'detach'}; 
+      get_MySQL_version();
+      collect_reports();
+   }
+
+   if($relative_infiles) { read_relative_infiles(); }
+}
+else
+{
+   if(!$op{'infile'})
+   {
+      get_MySQL_version();
+      get_vals();
+      get_vars();
+   }
+   else
+   {
+      read_infile($op{'infile'});
+   }
+
+   get_Com_values();
+
+   set_myisam_vals();
+   set_ib_vals() if $have_innodb_vals;
+
+   write_report();
+}
+
+exit_tasks_and_cleanup();
+
+exit;
+
+#
+# Subroutines
+#
+sub show_help_and_exit
+{
+   print <<"HELP";
+mysqlreport v3.4a Jan 23 2008
+mysqlreport makes an easy-to-read report of important MySQL status values.
+
+Command line options (abbreviations work):
+   --user USER       Connect to MySQL as USER
+   --password PASS   Use PASS or prompt for MySQL user's password
+   --host ADDRESS    Connect to MySQL at ADDRESS
+   --port PORT       Connect to MySQL at PORT
+   --socket SOCKET   Connect to MySQL at SOCKET
+   --no-mycnf        Don't read ~/.my.cnf
+   --infile FILE     Read status values from FILE instead of MySQL
+   --outfile FILE    Write report to FILE
+   --email ADDRESS   Email report to ADDRESS (doesn't work on Windows)
+   --flush-status    Issue FLUSH STATUS; after getting current values
+   --relative X      Generate relative reports. If X is an integer,
+                     reports are live from the MySQL server X seconds apart.
+                     If X is a list of infiles (file1 file2 etc.),
+                     reports are generated from the infiles in the order
+                     that they are given.
+   --report-count N  Collect N number of live relative reports (default 1)
+   --detach          Fork and detach from terminal (run in background)
+   --help            Prints this
+   --debug           Print debugging information
+
+Visit http://hackmysql.com/mysqlreport for more information.
+HELP
+
+   exit;
+}
+
+sub get_user_mycnf
+{
+   return if $WIN;
+   open MYCNF, "$ENV{HOME}/.my.cnf" or return;
+   while(<MYCNF>)
+   {
+      if(/^(.+?)\s*=\s*"?(.+?)"?\s*$/)
+      {
+         $mycnf{$1} = $2;
+         print "get_user_mycnf: read '$1 = $2'\n" if $op{debug};
+      }
+   }
+   $mycnf{'pass'} ||= $mycnf{'password'} if exists $mycnf{'password'};
+   close MYCNF;
+}
+
+sub collect_reports
+{
+   my $i;
+
+   get_vals();
+   get_vars();
+
+   get_Com_values();
+
+   %stats_past = %stats;
+
+   set_myisam_vals();
+   set_ib_vals() if $have_innodb_vals;
+
+   print "#\n# Beginning report, 0 0:0:0\n#\n";
+
+   write_report();
+
+   for($i = 0; $i < $op{'c'}; $i++)
+   {
+      sleep($op{'r'});
+
+      print "\n#\n# Interval report " , $i + 1 , ", +", sec_to_dhms(($i + 1) * $op{'r'}), "\n#\n";
+
+      get_vals();
+
+      write_relative_report();
+   }
+}
+
+sub read_relative_infiles
+{
+   my $slurp;    # Used to check infiles for multiple sets of status values
+   my $n_stats;  # Number of multiple sets of status values in an infile
+   my $infile;
+   my $report_n; # Report number
+
+   $report_n = 1;
+
+   foreach $infile (@ARGV)
+   {
+      # Read all of infile into $slurp
+      open INFILE, "< $infile" or warn and next;
+      $slurp = do { local $/;  <INFILE> };
+      close INFILE;
+
+      $n_stats = 0;
+
+      # Count number of status value sets
+      $n_stats++ while $slurp =~ /Aborted_clients/g;
+
+      print "read_relative_infiles: found $n_stats sets of status values in file '$infile'\n"
+         if $op{debug};
+
+      if($n_stats == 1)
+      {
+         read_infile($infile);
+         relative_infile_report($report_n++);
+      }
+
+      if($n_stats > 1)
+      {
+         my @tmpfile_fh;
+         my @tmpfile_name;
+         my $i;
+         my $stat_n;  # Status value set number
+
+         # Create a tmp file for each set of status values
+         for($i = 0; $i < $n_stats; $i++)
+         {
+            my ($fh, $name) = tempfile()
+               or die("read_relative_infiles: cannot open temporary file for writing: $!\n");
+
+            push(@tmpfile_fh, $fh);
+            push(@tmpfile_name, $name);
+
+            print "read_relative_infiles: created tmp file '$name'\n" if $op{debug};
+         }
+
+         $i = 0;
+         $stat_n = 0;
+
+         select $tmpfile_fh[$i];
+
+         # Read infile again and copy each set of status values
+         # to seperate tmp files
+         open INFILE, "< $infile" or warn and next;
+         while(<INFILE>)
+         {
+            next if /^\+/;
+            next if /^$/;
+
+            print;
+
+            if(/Aborted_clients/)
+            {
+               # The infile should begin with manually inserted system
+               # var values (like key_buffer_size = 128M). Therefore,
+               # the first occurance of /Aborted_clients/ indicates
+               # the first set of status values only if no sets have
+               # occured yet ($stat_n = 0). In this case, the following
+               # status values are printed to the current fh along with
+               # the system var values read so far until /Aborted_clients/
+               # occurs again. Then begins the second and subsequent sets
+               # of status values.
+               next if $stat_n++ == 0;
+
+               select $tmpfile_fh[++$i];
+            }
+         }
+         close INFILE;
+
+         # Re-select the main tmp file into which the reports are being written.
+         select $tmpfile_fh;
+
+         for($i = 0; $i < $n_stats; $i++)
+         {
+            close $tmpfile_fh[$i];
+
+            read_infile($tmpfile_name[$i]);
+            relative_infile_report($report_n++);
+
+            if($WIN) { `del $tmpfile_name[$i]`;   }
+            else     { `rm -f $tmpfile_name[$i]`; }
+
+            print "read_relative_infiles: deleted tmp file '$tmpfile_name[$i]'\n"
+               if $op{debug};
+         }
+
+      } # if($n_stats > 1)
+   } # foreach $infile (@files)
+}
+
+sub relative_infile_report
+{
+   my $report_n = shift;
+
+   if($report_n == 1)
+   {
+      get_Com_values();
+
+      %stats_past = %stats;
+
+      set_myisam_vals();
+      set_ib_vals() if $have_innodb_vals;
+
+      print "#\n# Beginning report, 0 0:0:0\n#\n";
+
+      write_report();
+   }
+   else
+   {
+      print "\n#\n# Interval report ", $report_n - 1, ", +",
+         sec_to_dhms($stats{Uptime} - $stats_past{Uptime}),
+         "\n#\n";
+
+      write_relative_report();
+   }
+}
+
+sub get_vals
+{
+   my @row;
+
+   # Get status values
+   if($major >= 5 && (($minor == 0 && $patch >= 2) || $minor > 0))
+   {
+      $query = $dbh->prepare("SHOW GLOBAL STATUS;");
+   }
+   else
+   {
+      $query = $dbh->prepare("SHOW STATUS;");
+   }
+   $query->execute();
+   while(@row = $query->fetchrow_array()) { $stats{$row[0]} = $row[1]; }
+
+   $real_uptime = $stats{'Uptime'};
+}
+
+sub get_vars
+{
+   my @row;
+
+   # Get server system variables
+   $query = $dbh->prepare("SHOW VARIABLES;");
+   $query->execute();
+   while(@row = $query->fetchrow_array()) { $vars{$row[0]} = $row[1]; }
+
+   # table_cache was renamed to table_open_cache in MySQL 5.1.3
+   if($major >= 5 && (($minor == 1 && $patch >= 3) || $minor > 1))
+   {
+      $vars{'table_cache'} = $vars{'table_open_cache'};
+   }
+}
+
+sub read_infile
+{
+   my $infile = shift;
+
+   # Default values if not set in INFILE
+   $vars{'version'} = "0.0.0"         if !exists $vars{'version'};
+   $vars{'table_cache'} = 64          if !exists $vars{'table_cache'};
+   $vars{'max_connections'} = 100     if !exists $vars{'max_connections'};
+   $vars{'key_buffer_size'} = 8388600 if !exists $vars{'key_buffer_size'}; # 8M
+   $vars{'thread_cache_size'} = 0     if !exists $vars{'thread_cache_size'}; 
+   $vars{'tmp_table_size'} = 0        if !exists $vars{'tmp_table_size'};
+   $vars{'long_query_time'} = '?'     if !exists $vars{'long_query_time'};
+   $vars{'log_slow_queries'} = '?'    if !exists $vars{'log_slow_queries'};
+
+   # One should also add:
+   #    key_cache_block_size
+   #    query_cache_size
+   # to their infile if needed.
+
+   open INFILE, "< $infile" or warn;
+   while(<INFILE>)
+   {
+      next if /^\+\-/;
+      next if /^$/;
+
+      chomp;
+
+      if(/([A-Za-z_]+)[\s\t|]+(\d+)/)
+      {
+         $stats{$1} = $2;
+         next;
+      }
+
+      # Explicit var = val (e.g. key_buffer_size = 128M)
+      if( /^\s*(\w+)\s*=\s*([0-9.]+)(M*)\s*$/ )
+      {
+         $vars{$1} = ($3 ? $2 * 1024 * 1024 : $2);
+         print "read_infile: read '$_' as $1 = $vars{$1}\n" if $op{debug};
+         next;
+      }
+      else
+      {
+         print "read_infile: unrecognized line: '$_'\n" if $op{debug};
+      }
+   }
+   close INFILE;
+
+   $real_uptime = $stats{'Uptime'};
+
+   $vars{'table_cache'} = $vars{'table_open_cache'} if exists $vars{'table_open_cache'};
+
+   get_MySQL_version();
+}
+
+sub get_MySQL_version
+{
+   return if $major;
+
+   if($op{'infile'} || $relative_infiles)
+   {
+      ($major, $minor, $patch) = ($vars{'version'} =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/);
+   }
+   else
+   {
+      my @row;
+
+      $query = $dbh->prepare("SHOW VARIABLES LIKE 'version';");
+      $query->execute();
+      @row = $query->fetchrow_array();
+      ($major, $minor, $patch) = ($row[1] =~ /(\d{1,2})\.(\d{1,2})\.(\d{1,2})/);
+   }
+
+   # Innodb_ status values were added in 5.0.2
+   if($major <= 4 || $patch < 2)
+   {
+      $have_innodb_vals = 0;
+      print "get_MySQL_version: no InnoDB reports because MySQL version is older than 5.0.2\n" if $op{debug};
+   }
+}
+
+sub set_myisam_vals
+{
+   $questions = $stats{'Questions'};
+
+   $key_read_ratio = sprintf "%.2f",
+                     ($stats{'Key_read_requests'} ?
+                      100 - ($stats{'Key_reads'} / $stats{'Key_read_requests'}) * 100 :
+                      0);
+
+   $key_write_ratio = sprintf "%.2f",
+                      ($stats{'Key_write_requests'} ?
+                       100 - ($stats{'Key_writes'} / $stats{'Key_write_requests'}) * 100 :
+                       0);
+
+   $key_cache_block_size = (defined $vars{'key_cache_block_size'} ?
+                            $vars{'key_cache_block_size'} :
+                            1024);
+
+   $key_buffer_used = $stats{'Key_blocks_used'} * $key_cache_block_size;
+
+   if(defined $stats{'Key_blocks_unused'}) # MySQL 4.1.2+
+   {
+      $key_buffer_usage =  $vars{'key_buffer_size'} -
+                           ($stats{'Key_blocks_unused'} * $key_cache_block_size);
+   }
+   else { $key_buffer_usage = -1; }
+
+   # Data Manipulation Statements: http://dev.mysql.com/doc/refman/5.0/en/data-manipulation.html
+   %DMS_vals =
+   (
+      SELECT  => $stats{'Com_select'},
+      INSERT  => $stats{'Com_insert'}  + $stats{'Com_insert_select'},
+      REPLACE => $stats{'Com_replace'} + $stats{'Com_replace_select'},
+      UPDATE  => $stats{'Com_update'}  +
+                 (exists $stats{'Com_update_multi'} ? $stats{'Com_update_multi'} : 0),
+      DELETE  => $stats{'Com_delete'}  +
+                 (exists $stats{'Com_delete_multi'} ? $stats{'Com_delete_multi'} : 0)
+   );
+
+   $dms = $DMS_vals{SELECT} + $DMS_vals{INSERT} + $DMS_vals{REPLACE} + $DMS_vals{UPDATE} + $DMS_vals{DELETE};
+
+   $slow_query_t = "($vars{long_query_time})";
+
+}
+
+sub set_ib_vals
+{
+   $ib_bp_used  = ($stats{'Innodb_buffer_pool_pages_total'} -
+                   $stats{'Innodb_buffer_pool_pages_free'}) *
+                   $stats{'Innodb_page_size'};
+
+   $ib_bp_total = $stats{'Innodb_buffer_pool_pages_total'} * $stats{'Innodb_page_size'};
+
+   $ib_bp_read_ratio = sprintf "%.2f",
+                       ($stats{'Innodb_buffer_pool_read_requests'} ?
+                        100 - ($stats{'Innodb_buffer_pool_reads'} /
+                           $stats{'Innodb_buffer_pool_read_requests'}) * 100 :
+                        0);
+}
+
+sub write_relative_report
+{
+      %stats_present = %stats;
+
+      for(keys %stats)
+      {
+         if($stats_past{$_} =~ /\d+/)
+         {
+            if($stats_present{$_} >= $stats_past{$_}) # Avoid negative values
+            {
+               $stats{$_} = $stats_present{$_} - $stats_past{$_};
+            }
+         }
+      }
+
+      # These values are either "at present" or "high water marks".
+      # Therefore, it is more logical to not relativize these values.
+      # Doing otherwise causes strange and misleading values.
+      $stats{'Key_blocks_used'}      = $stats_present{'Key_blocks_used'};
+      $stats{'Open_tables'}          = $stats_present{'Open_tables'};
+      $stats{'Max_used_connections'} = $stats_present{'Max_used_connections'};
+      $stats{'Threads_running'}      = $stats_present{'Threads_running'};
+      $stats{'Threads_connected'}    = $stats_present{'Threads_connected'};
+      $stats{'Threads_cached'}       = $stats_present{'Threads_cached'};
+      $stats{'Qcache_free_blocks'}   = $stats_present{'Qcache_free_blocks'};
+      $stats{'Qcache_total_blocks'}  = $stats_present{'Qcache_total_blocks'};
+      $stats{'Qcache_free_memory'}   = $stats_present{'Qcache_free_memory'};
+      if($have_innodb_vals)
+      {
+         $stats{'Innodb_page_size'}                 = $stats_present{'Innodb_page_size'};
+         $stats{'Innodb_buffer_pool_pages_data'}    = $stats_present{'Innodb_buffer_pool_pages_data'};
+         $stats{'Innodb_buffer_pool_pages_dirty'}   = $stats_present{'Innodb_buffer_pool_pages_dirty'};
+         $stats{'Innodb_buffer_pool_pages_free'}    = $stats_present{'Innodb_buffer_pool_pages_free'};
+         $stats{'Innodb_buffer_pool_pages_latched'} = $stats_present{'Innodb_buffer_pool_pages_latched'};
+         $stats{'Innodb_buffer_pool_pages_misc'}    = $stats_present{'Innodb_buffer_pool_pages_misc'};
+         $stats{'Innodb_buffer_pool_pages_total'}   = $stats_present{'Innodb_buffer_pool_pages_total'};
+         $stats{'Innodb_data_pending_fsyncs'}       = $stats_present{'Innodb_data_pending_fsyncs'};
+         $stats{'Innodb_data_pending_reads'}        = $stats_present{'Innodb_data_pending_reads'};
+         $stats{'Innodb_data_pending_writes'}       = $stats_present{'Innodb_data_pending_writes'};
+
+         # Innodb_row_lock_ values were added in MySQL 5.0.3
+         if((($minor == 0 && $patch >= 3) || $minor > 0))
+         {
+            $stats{'Innodb_row_lock_current_waits'} = $stats_present{'Innodb_row_lock_current_waits'};
+            $stats{'Innodb_row_lock_time_avg'}      = $stats_present{'Innodb_row_lock_time_avg'};
+            $stats{'Innodb_row_lock_time_max'}      = $stats_present{'Innodb_row_lock_time_max'};
+         }
+      }
+
+      get_Com_values();
+
+      %stats_past = %stats_present;
+
+      set_myisam_vals();
+      set_ib_vals() if $have_innodb_vals;
+
+      write_report();
+}
+
+sub write_report
+{
+   $~ = 'MYSQL_TIME', write;
+   $~ = 'KEY_BUFF_MAX', write;
+   if($key_buffer_usage != -1) { $~ = 'KEY_BUFF_USAGE', write }
+   $~ = 'KEY_RATIOS', write;
+   write_DTQ();
+   $~ = 'SLOW_DMS', write;
+   write_DMS();
+   write_Com();
+   $~ = 'SAS', write; 
+   write_qcache(); 
+   $~ = 'REPORT_END', write;
+   $~ = 'TAB', write;
+
+   write_InnoDB() if $have_innodb_vals;
+}
+
+sub sec_to_dhms # Seconds to days hours:minutes:seconds
+{
+   my $s = shift;
+   my ($d, $h, $m) = (0, 0, 0);
+
+   return '0 0:0:0' if $s <= 0;
+
+   if($s >= 86400)
+   {
+      $d = int $s / 86400;
+      $s -= $d * 86400;
+   }
+
+   if($s >= 3600)
+   {
+     $h = int $s / 3600;
+     $s -= $h * 3600;
+   }
+   
+   $m = int $s / 60;
+   $s -= $m * 60;
+   
+   return "$d $h:$m:$s";
+}
+
+sub make_short
+{
+   my ($number, $kb, $d) = @_;
+   my $n = 0;
+   my $short;
+
+   $d ||= 2;
+
+   if($kb) { while ($number > 1023) { $number /= 1024; $n++; }; }
+   else { while ($number > 999) { $number /= 1000; $n++; }; }
+
+   $short = sprintf "%.${d}f%s", $number, ('','k','M','G','T')[$n];
+   if($short =~ /^(.+)\.(00)$/) { return $1; } # 12.00 -> 12 but not 12.00k -> 12k
+
+   return $short;
+}
+
+sub perc # Percentage
+{
+   my($is, $of) = @_;
+   return sprintf "%.2f", ($is * 100) / ($of ||= 1);
+}
+
+sub t # Time average per second
+{
+   my $val = shift;
+   return 0 if !$val;
+   return(make_short($val / $stats{'Uptime'}, 0, 1));
+}
+
+sub email_report # Email given report to $op{'email'}
+{
+   return if $WIN;
+
+   my $report = shift;
+
+   open SENDMAIL, "|/usr/sbin/sendmail -t";
+   print SENDMAIL "From: mysqlreport\n";
+   print SENDMAIL "To: $op{email}\n";
+   print SENDMAIL "Subject: MySQL status report on " . ($mycnf{'host'} || 'localhost') . "\n\n";
+   print SENDMAIL `cat $report`;
+   close SENDMAIL;
+}
+
+sub cat_report # Print given report to screen
+{
+   my $report = shift;
+   my @report;
+
+   open REPORT, "< $report";
+   @report = <REPORT>;
+   close REPORT;
+   print @report;
+}
+
+sub get_Com_values
+{
+   %Com_vals = ();
+
+   # Make copy of just the Com_ values
+   for(keys %stats)
+   {
+      if(grep /^Com_/, $_ and $stats{$_} > 0)
+      {
+         /^Com_(.*)/;
+         $Com_vals{$1} = $stats{$_};
+      }
+   }
+
+   # Remove DMS values
+   delete $Com_vals{'select'};
+   delete $Com_vals{'insert'};
+   delete $Com_vals{'insert_select'};
+   delete $Com_vals{'replace'};
+   delete $Com_vals{'replace_select'};
+   delete $Com_vals{'update'};
+   delete $Com_vals{'update_multi'} if exists $Com_vals{'update_multi'};
+   delete $Com_vals{'delete'};
+   delete $Com_vals{'delete_multi'} if exists $Com_vals{'delete_multi'};
+}
+
+sub write_DTQ # Write DTQ report in descending order by values
+{
+   $~ = 'DTQ';
+
+   my %DTQ;
+   my $first = 1;
+
+   # Total Com values
+   $stat_val = 0;
+   for(values %Com_vals) { $stat_val += $_; }
+   $DTQ{'Com_'} = $stat_val;
+
+   $DTQ{'DMS'}      = $dms;
+   $DTQ{'QC Hits'}  = $stats{'Qcache_hits'} if $stats{'Qcache_hits'} != 0;
+   $DTQ{'COM_QUIT'} = int (($stats{'Connections'} - 2) - ($stats{'Aborted_clients'} / 2));
+
+   $stat_val = 0;
+   for(values %DTQ) { $stat_val += $_; }
+   if($questions != $stat_val)
+   {
+      $DTQ{($questions > $stat_val ? '+Unknown' : '-Unknown')} = abs $questions - $stat_val;
+   }
+
+   for(sort { $DTQ{$b} <=> $DTQ{$a} } keys(%DTQ))
+   {
+      if($first) { $stat_label = '%Total:'; $first = 0; }
+      else       { $stat_label = ''; }
+
+      $stat_name = $_;
+      $stat_val  = $DTQ{$_};
+      write;
+   }
+}
+
+sub write_DMS # Write DMS report in descending order by values
+{
+   $~ = 'DMS';
+
+   for(sort { $DMS_vals{$b} <=> $DMS_vals{$a} } keys(%DMS_vals))
+   {
+      $stat_name = $_;
+      $stat_val  = $DMS_vals{$_};
+      write;
+   }
+}
+
+sub write_Com # Write COM report in descending order by values
+{
+   my $i = $op{'com'};
+
+   $~ = 'COM_1';
+
+   # Total Com values and write first line of COM report
+   $stat_label = '%Total:' unless $op{'dtq'};
+   $stat_val   = 0;
+   for(values %Com_vals) { $stat_val += $_; }
+   write;
+
+   $~ = 'COM_2';
+
+   # Sort remaining Com values, print only the top $op{'com'} number of values
+   for(sort { $Com_vals{$b} <=> $Com_vals{$a} } keys(%Com_vals))
+   {
+      $stat_name = $_;
+      $stat_val  = $Com_vals{$_};
+      write;
+
+      last if !(--$i);
+   }
+}
+
+sub write_qcache
+{
+   # Query cache was added in 4.0.1, but have_query_cache was added in 4.0.2,
+   # ergo this method is slightly more reliable
+   return if not exists $vars{'query_cache_size'};
+   return if $vars{'query_cache_size'} == 0;
+
+   $qc_mem_used = $vars{'query_cache_size'} - $stats{'Qcache_free_memory'};
+   $qc_hi_r = sprintf "%.2f", $stats{'Qcache_hits'} / ($stats{'Qcache_inserts'} ||= 1);
+   $qc_ip_r = sprintf "%.2f", $stats{'Qcache_inserts'} / ($stats{'Qcache_lowmem_prunes'} ||= 1);
+
+   $~ = 'QCACHE';
+   write;
+}
+
+sub write_InnoDB
+{
+   # Innodb_ status values were added in MySQL 5.0.2
+   if(! ($major >= 5 && (($minor == 0 && $patch >= 2) || $minor > 0)) )
+   {
+      # In case infile has Innodb_ values but didn't specify the MySQL version
+      if(not defined $stats{'Innodb_page_size'}) { return; }
+   }
+
+   $~ = 'IB';
+   write;
+
+   # Innodb_row_lock_ values were added in MySQL 5.0.3
+   if((($minor == 0 && $patch >= 3) || $minor > 0))
+   {
+      $~ = 'IB_LOCK';
+      write;
+   }
+
+   # Data, Pages, Rows
+   $~ = 'IB_DPR';
+   write;
+}
+
+sub have_op
+{
+   my $key = shift;
+   return 1 if (exists $op{$key} && $op{$key} ne '');
+   return 0;
+}
+
+sub sig_handler
+{
+   print "\nReceived signal at " , scalar localtime , "\n";
+   exit_tasks_and_cleanup();
+   exit;
+}
+
+sub exit_tasks_and_cleanup
+{
+   close $tmpfile_fh;
+   select STDOUT unless $op{'detach'};
+
+   email_report($tmpfile) if $op{'email'};
+
+   cat_report($tmpfile) unless $op{'detach'};
+
+   if($op{'outfile'})
+   {
+      if($WIN) { `move $tmpfile $op{outfile}`; }
+      else     { `mv $tmpfile $op{outfile}`;   }
+   }
+   else
+   {
+      if($WIN) { `del $tmpfile`;   }
+      else     { `rm -f $tmpfile`; }
+   }
+
+   if(!$op{'infile'} && !$relative_infiles)
+   {
+      if($op{'flush-status'})
+      {
+         $query = $dbh->prepare("FLUSH STATUS;");
+         $query->execute();
+      }
+
+      $query->finish();
+      $dbh->disconnect();
+   }
+}
+
+#
+# Formats
+#
+
+format MYSQL_TIME =
+MySQL @<<<<<<<<<<<<<<<<  uptime @<<<<<<<<<<<   @>>>>>>>>>>>>>>>>>>>>>>>>
+$vars{'version'}, sec_to_dhms($real_uptime), (($op{infile} || $relative_infiles) ? '' : scalar localtime)
+.
+
+format KEY_BUFF_MAX =
+
+__ Key _________________________________________________________________
+Buffer used   @>>>>>> of @>>>>>>  %Used: @>>>>>
+make_short($key_buffer_used, 1), make_short($vars{'key_buffer_size'}, 1), perc($key_buffer_used, $vars{'key_buffer_size'})
+.
+
+format KEY_BUFF_USAGE =
+  Current     @>>>>>>            %Usage: @>>>>>
+make_short($key_buffer_usage, 1), perc($key_buffer_usage, $vars{'key_buffer_size'})
+.
+
+format KEY_RATIOS =
+Write hit     @>>>>>%
+$key_write_ratio
+Read hit      @>>>>>%
+$key_read_ratio
+
+__ Questions ___________________________________________________________
+Total       @>>>>>>>>  @>>>>>/s
+make_short($questions), t($questions)
+.
+
+format DTQ =
+  @<<<<<<<  @>>>>>>>>  @>>>>>/s  @>>>>>> @>>>>>
+$stat_name, make_short($stat_val), t($stat_val), $stat_label, perc($stat_val, $questions)
+.
+
+format SLOW_DMS =
+Slow @<<<<< @>>>>>>>>  @>>>>>/s          @>>>>>  %DMS: @>>>>>  Log: @>> 
+$slow_query_t, make_short($stats{'Slow_queries'}), t($stats{'Slow_queries'}), perc($stats{'Slow_queries'}, $questions), perc($stats{'Slow_queries'}, $dms), $vars{'log_slow_queries'}
+DMS         @>>>>>>>>  @>>>>>/s          @>>>>>
+make_short($dms), t($dms), perc($dms, $questions)
+.
+
+format DMS =
+  @<<<<<<<  @>>>>>>>>  @>>>>>/s          @>>>>>        @>>>>>
+$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions), perc($stat_val, $dms)
+.
+
+format COM_1 =
+Com_        @>>>>>>>>  @>>>>>/s          @>>>>>
+make_short($stat_val), t($stat_val), perc($stat_val, $questions)
+.
+
+format COM_2 =
+  @<<<<<<<<<< @>>>>>>  @>>>>>/s          @>>>>>
+$stat_name, make_short($stat_val), t($stat_val), perc($stat_val, $questions)
+.
+
+format SAS =
+
+__ SELECT and Sort _____________________________________________________
+Scan          @>>>>>>   @>>>>/s %SELECT: @>>>>>
+make_short($stats{'Select_scan'}), t($stats{'Select_scan'}), perc($stats{'Select_scan'}, $stats{'Com_select'})
+Range         @>>>>>>   @>>>>/s          @>>>>>
+make_short($stats{'Select_range'}), t($stats{'Select_range'}), perc($stats{'Select_range'}, $stats{'Com_select'})
+Full join     @>>>>>>   @>>>>/s          @>>>>>
+make_short($stats{'Select_full_join'}), t($stats{'Select_full_join'}), perc($stats{'Select_full_join'}, $stats{'Com_select'})
+Range check   @>>>>>>   @>>>>/s          @>>>>>
+make_short($stats{'Select_range_check'}), t($stats{'Select_range_check'}), perc($stats{'Select_range_check'}, $stats{'Com_select'})
+Full rng join @>>>>>>   @>>>>/s          @>>>>>
+make_short($stats{'Select_full_range_join'}), t($stats{'Select_full_range_join'}), perc($stats{'Select_full_range_join'}, $stats{'Com_select'})
+Sort scan     @>>>>>>   @>>>>/s
+make_short($stats{'Sort_scan'}), t($stats{'Sort_scan'})
+Sort range    @>>>>>>   @>>>>/s
+make_short($stats{'Sort_range'}), t($stats{'Sort_range'})
+Sort mrg pass @>>>>>>   @>>>>/s
+make_short($stats{'Sort_merge_passes'}), t($stats{'Sort_merge_passes'})
+.
+
+format QCACHE =
+
+__ Query Cache _________________________________________________________
+Memory usage  @>>>>>> of @>>>>>>  %Used: @>>>>>
+make_short($qc_mem_used, 1), make_short($vars{'query_cache_size'}, 1), perc($qc_mem_used, $vars{'query_cache_size'})
+Block Fragmnt @>>>>>%
+perc($stats{'Qcache_free_blocks'}, $stats{'Qcache_total_blocks'})
+Hits          @>>>>>>   @>>>>/s
+make_short($stats{'Qcache_hits'}), t($stats{'Qcache_hits'})
+Inserts       @>>>>>>   @>>>>/s
+make_short($stats{'Qcache_inserts'}), t($stats{'Qcache_inserts'})
+Insrt:Prune @>>>>>>:1   @>>>>/s
+make_short($qc_ip_r), t($stats{'Qcache_inserts'} - $stats{'Qcache_lowmem_prunes'})
+Hit:Insert  @>>>>>>:1
+$qc_hi_r, t($qc_hi_r)
+.
+
+# Not really the end...
+format REPORT_END =
+
+__ Table Locks _________________________________________________________
+Waited      @>>>>>>>>  @>>>>>/s  %Total: @>>>>>
+make_short($stats{'Table_locks_waited'}), t($stats{'Table_locks_waited'}), perc($stats{'Table_locks_waited'}, $stats{'Table_locks_waited'} + $stats{'Table_locks_immediate'});
+Immediate   @>>>>>>>>  @>>>>>/s
+make_short($stats{'Table_locks_immediate'}), t($stats{'Table_locks_immediate'})
+
+__ Tables ______________________________________________________________
+Open        @>>>>>>>> of @>>>    %Cache: @>>>>>
+$stats{'Open_tables'}, $vars{'table_cache'}, perc($stats{'Open_tables'}, $vars{'table_cache'})
+Opened      @>>>>>>>>  @>>>>>/s
+make_short($stats{'Opened_tables'}), t($stats{'Opened_tables'})
+
+__ Connections _________________________________________________________
+Max used    @>>>>>>>> of @>>>      %Max: @>>>>>
+$stats{'Max_used_connections'}, $vars{'max_connections'}, perc($stats{'Max_used_connections'}, $vars{'max_connections'})
+Total       @>>>>>>>>  @>>>>>/s
+make_short($stats{'Connections'}), t($stats{'Connections'})
+
+__ Created Temp ________________________________________________________
+Disk table  @>>>>>>>>  @>>>>>/s
+make_short($stats{'Created_tmp_disk_tables'}), t($stats{'Created_tmp_disk_tables'})
+Table       @>>>>>>>>  @>>>>>/s    Size: @>>>>>
+make_short($stats{'Created_tmp_tables'}), t($stats{'Created_tmp_tables'}), make_short($vars{'tmp_table_size'}, 1, 1)
+File        @>>>>>>>>  @>>>>>/s
+make_short($stats{'Created_tmp_files'}), t($stats{'Created_tmp_files'})
+.
+
+format TAB =
+
+__ Threads _____________________________________________________________
+Running     @>>>>>>>> of @>>>
+$stats{'Threads_running'}, $stats{'Threads_connected'}
+Cached      @>>>>>>>> of @>>>      %Hit: @>>>>>
+$stats{'Threads_cached'}, $vars{'thread_cache_size'}, make_short(100 - perc($stats{'Threads_created'}, $stats{'Connections'}))
+Created     @>>>>>>>>  @>>>>>/s
+make_short($stats{'Threads_created'}), t($stats{'Threads_created'})
+Slow        @>>>>>>>>  @>>>>>/s
+$stats{'Slow_launch_threads'}, t($stats{'Slow_launch_threads'})
+
+__ Aborted _____________________________________________________________
+Clients     @>>>>>>>>  @>>>>>/s
+make_short($stats{'Aborted_clients'}), t($stats{'Aborted_clients'})
+Connects    @>>>>>>>>  @>>>>>/s
+make_short($stats{'Aborted_connects'}), t($stats{'Aborted_connects'})
+
+__ Bytes _______________________________________________________________
+Sent        @>>>>>>>>  @>>>>>/s
+make_short($stats{'Bytes_sent'}), t($stats{'Bytes_sent'})
+Received    @>>>>>>>>  @>>>>>/s
+make_short($stats{'Bytes_received'}), t($stats{'Bytes_received'})
+.
+
+format IB =
+
+__ InnoDB Buffer Pool __________________________________________________
+Usage         @>>>>>> of @>>>>>>  %Used: @>>>>>
+make_short($ib_bp_used, 1), make_short($ib_bp_total, 1), perc($ib_bp_used, $ib_bp_total)
+Read hit      @>>>>>%
+$ib_bp_read_ratio;
+Pages
+  Free      @>>>>>>>>            %Total: @>>>>>
+make_short($stats{'Innodb_buffer_pool_pages_free'}), perc($stats{'Innodb_buffer_pool_pages_free'}, $stats{'Innodb_buffer_pool_pages_total'})
+  Data      @>>>>>>>>                    @>>>>> %Drty: @>>>>>
+make_short($stats{'Innodb_buffer_pool_pages_data'}), perc($stats{'Innodb_buffer_pool_pages_data'}, $stats{'Innodb_buffer_pool_pages_total'}), perc($stats{'Innodb_buffer_pool_pages_dirty'}, $stats{'Innodb_buffer_pool_pages_data'})
+  Misc      @>>>>>>>>                    @>>>>>
+  $stats{'Innodb_buffer_pool_pages_misc'}, perc($stats{'Innodb_buffer_pool_pages_misc'}, $stats{'Innodb_buffer_pool_pages_total'})
+  Latched   @>>>>>>>>                    @>>>>>
+$stats{'Innodb_buffer_pool_pages_latched'}, perc($stats{'Innodb_buffer_pool_pages_latched'}, $stats{'Innodb_buffer_pool_pages_total'})
+Reads       @>>>>>>>>  @>>>>>/s  
+make_short($stats{'Innodb_buffer_pool_read_requests'}), t($stats{'Innodb_buffer_pool_read_requests'})
+  From file @>>>>>>>>  @>>>>>/s          @>>>>>
+make_short($stats{'Innodb_buffer_pool_reads'}), t($stats{'Innodb_buffer_pool_reads'}), perc($stats{'Innodb_buffer_pool_reads'}, $stats{'Innodb_buffer_pool_read_requests'})
+  Ahead Rnd @>>>>>>>>  @>>>>>/s
+$stats{'Innodb_buffer_pool_read_ahead_rnd'}, t($stats{'Innodb_buffer_pool_read_ahead_rnd'})
+  Ahead Sql @>>>>>>>>  @>>>>>/s
+$stats{'Innodb_buffer_pool_read_ahead_seq'}, t($stats{'Innodb_buffer_pool_read_ahead_seq'})
+Writes      @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_buffer_pool_write_requests'}), t($stats{'Innodb_buffer_pool_write_requests'})
+Flushes     @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_buffer_pool_pages_flushed'}), t($stats{'Innodb_buffer_pool_pages_flushed'})
+Wait Free   @>>>>>>>>  @>>>>>/s
+$stats{'Innodb_buffer_pool_wait_free'}, t($stats{'Innodb_buffer_pool_wait_free'})
+.
+
+format IB_LOCK =
+
+__ InnoDB Lock _________________________________________________________
+Waits       @>>>>>>>>  @>>>>>/s
+$stats{'Innodb_row_lock_waits'}, t($stats{'Innodb_row_lock_waits'})
+Current     @>>>>>>>>
+$stats{'Innodb_row_lock_current_waits'}
+Time acquiring
+  Total     @>>>>>>>> ms
+$stats{'Innodb_row_lock_time'}
+  Average   @>>>>>>>> ms
+$stats{'Innodb_row_lock_time_avg'}
+  Max       @>>>>>>>> ms
+$stats{'Innodb_row_lock_time_max'}
+.
+
+format IB_DPR =
+
+__ InnoDB Data, Pages, Rows ____________________________________________
+Data
+  Reads     @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_data_reads'}), t($stats{'Innodb_data_reads'})
+  Writes    @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_data_writes'}), t($stats{'Innodb_data_writes'})
+  fsync     @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_data_fsyncs'}), t($stats{'Innodb_data_fsyncs'})
+  Pending
+    Reads   @>>>>>>>>
+$stats{'Innodb_data_pending_reads'}, t($stats{'Innodb_data_pending_reads'})
+    Writes  @>>>>>>>>
+$stats{'Innodb_data_pending_writes'}, t($stats{'Innodb_data_pending_writes'})
+    fsync   @>>>>>>>>
+$stats{'Innodb_data_pending_fsyncs'}, t($stats{'Innodb_data_pending_fsyncs'})
+
+Pages
+  Created   @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_pages_created'}), t($stats{'Innodb_pages_created'})
+  Read      @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_pages_read'}), t($stats{'Innodb_pages_read'})
+  Written   @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_pages_written'}), t($stats{'Innodb_pages_written'})
+
+Rows
+  Deleted   @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_rows_deleted'}), t($stats{'Innodb_rows_deleted'})
+  Inserted  @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_rows_inserted'}), t($stats{'Innodb_rows_inserted'})
+  Read      @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_rows_read'}), t($stats{'Innodb_rows_read'})
+  Updated   @>>>>>>>>  @>>>>>/s
+make_short($stats{'Innodb_rows_updated'}), t($stats{'Innodb_rows_updated'})
+.

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport.1
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport.1	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/mysqlreport/mysqlreport.1	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,180 @@
+.TH "mysqlreport" "1" "2.5 2006-09-01 (docrev 2006-05-19)" "Daniel Nichter" "MYSQL"
+.SH "NAME"
+.LP 
+mysqlreport \- Makes a friendly report of important MySQL status values
+.SH "SYNTAX"
+.LP 
+mysqlreport [\fIoptions\fP]
+.SH "DESCRIPTION"
+.LP 
+mysqlreport makes a friendly report of important MySQL status values. Actually,
+it makes a friendly report of nearly every status value from SHOW STATUS.
+Unlike SHOW STATUS which simply dumps over 100 values to screen in one long
+list, mysqlreport interprets and formats the values and presents the basic
+values and many more inferred values in a human\-readable format. Numerous
+example reports are available at the mysqlreport web page at
+http://hackmysql.com/mysqlreport.
+
+The benefit of mysqlreport is that it allows you to very quickly see a wide
+array of performance indicators for your MySQL server which would otherwise
+need to be calculated by hand from all the various SHOW STATUS values. For
+example, the Index Read Ratio is an important value but it's not present in
+SHOW STATUS; it's an inferred value (the ratio of Key_reads to
+Key_read_requests).
+
+This documentation outlines all the command line options in mysqlreport, most
+of which control which reports are printed. This document does not address
+how to interpret these reports; that topic is covered in the document Guide
+To Understanding mysqlreport at http://hackmysql.com/mysqlreportguide.
+
+.SH "OPTIONS"
+Technically, command line options are in the form \-\-option, but \-option works
+too. All options can be abbreviated if the abbreviation is unique. For example,
+option \-\-host can be abbreviated \-\-ho but not \-\-h because \-\-h is ambiguous: it
+could mean \-\-host or \-\-help.
+
+.LP 
+
+.TP 
+\fB\-\-help\fR
+Output help information and exit.
+
+.TP 
+\fB\-\-user USER\fR
+
+.TP 
+\fB\-\-password\fR
+As of version 2.3 \-\-password can take the password on the
+command line like "\-\-password FOO". Using \-\-password
+alone without giving a password on the command line
+causes mysqlreport to prompt for a password.
+
+.TP 
+\fB\-\-host ADDRESS\fR
+
+.TP 
+\fB\-\-port PORT\fR
+
+.TP
+\fB\-\-socket SOCKET\fR
+
+.TP 
+\fB\-\-no\-mycnf\fR
+\-\-no\-mycnf makes mysqlreport not read ~/.my.cnf which it does by default
+otherwise. \-\-user and \-\-password always override values from ~/.my.cnf.
+
+.TP 
+\fB\-\-dtq\fR
+Print Distribution of Total Queries (DTQ) report (under
+Total in Questions report). Queries (or Questions) can
+be divided into four main areas: DMS (see \-\-dms below),
+Com_ (see \-\-com below), COM_QUIT (see COM_QUIT and
+Questions at http://hackmysql.com/com_quit), and
+Unknown. \-\-dtq lists the number of queries in each of
+these areas in descending order.
+
+.TP 
+\fB\-\-dms\fR
+Print Data Manipulation Statements (DMS) report (under
+DMS in Questions report). DMS are those from the MySQL
+manual section 13.2. Data Manipulation Statements.
+(Currently, mysqlreport considers only SELECT, INSERT,
+REPLACE, UPDATE, and DELETE.) Each DMS is listed in
+descending order by count.
+
+.TP 
+\fB\-\-com N\fR
+Print top N number of non\-DMS Com_ status values in
+descending order (after DMS in Questions report). If N
+is not given, default is 3. Such non\-DMS Com_ values
+include Com_change_db, Com_show_tables, Com_rollback,
+etc.
+
+.TP 
+\fB\-\-sas\fR
+Print report for Select_ and Sort_ status values (after
+Questions report). See MySQL Select and Sort Status
+Variables at http://hackmysql.com/selectandsort.
+
+.TP
+\fB\-\-tab\fR
+Print Threads, Aborted, and Bytes status reports (after
+Created temp report). As of mysqlreport v2.3 the
+Threads report reports on all Threads_ status values.
+
+.TP
+\fB\-\-qcache\fR
+Print Query Cache report.
+.TP
+\fB\-\-all\fR
+Equivalent to "\-\-dtq \-\-dms \-\-com 3 \-\-sas \-\-qcache".
+(Notice \-\-tab is not invoked by \-\-all.)
+
+.TP
+\fB\-\-infile FILE\fR
+Instead of getting SHOW STATUS values from MySQL, read
+values from FILE. FILE is often a copy of the output of
+SHOW STATUS including formatting characters (|, +, \-).
+mysqlreport expects FILE to have the format
+" value number " where value is only alpha and
+underscore characters (A\-Z and _) and number is a
+positive integer. Anything before, between, or after
+value and number is ignored. mysqlreport also needs
+the following MySQL server variables: version,
+table_cache, max_connections, key_buffer_size,
+query_cache_size. These values can be specified in
+INFILE in the format "name = value" where name is one
+of the aforementioned server variables and value is a
+positive integer with or without a trailing M and
+possible periods (for version). For example, to specify
+an 18M key_buffer_size: key_buffer_size = 18M. Or, a
+256 table_cache: table_cache = 256. The M implies
+Megabytes not million, so 18M means 18,874,368 not
+18,000,000. If these server variables are not specified
+the following defaults are used (respectively) which
+may cause strange values to be reported: 0.0.0, 64,
+100, 8M, 0.
+
+.TP
+\fB\-\-outfile FILE\fR  
+After printing the report to screen, print the report
+to FILE too. Internally, mysqlreport always writes the
+report to a temp file first: /tmp/mysqlreport.PID on
+*nix, c:\mysqlreport.PID on Windows (PID is the
+script's process ID). Then it prints the temp file to
+screen. Then if \-\-outfile is specified, the temp file
+is copied to OUTFILE. After \-\-email (below), the temp
+file is deleted.
+
+.TP
+\fB\-\-email ADDRESS\fR
+After printing the report to screen, email the report
+to ADDRESS. This option requires sendmail in
+/usr/sbin/, therefore it does not work on Windows.
+/usr/sbin/sendmail can be a sym link to qmail, for
+example, or any MTA that emulates sendmail's \-t
+command line option and operation. The FROM: field is
+"mysqlreport", SUBJECT: is "MySQL status report".
+
+.TP
+\fB\-\-flush\-status\fR
+Execute a "FLUSH STATUS;" after generating the reports.
+If you do not have permissions in MySQL to do this an
+error from DBD::mysql::st will be printed after the
+reports.
+
+.SH "AUTHORS"
+.LP 
+Daniel Nichter
+
+If mysqlreport breaks, send me a message from 
+http://hackmysql.com/feedback 
+with the error.
+
+.SH "SEE ALSO"
+.LP 
+mytop(1)
+.LP
+The comprehensive Guide To Understanding mysqlreport at 
+http://hackmysql.com/mysqlreportguide.
+

Added: mysql-dfsg-5.0/branches/unstable/debian/additions/ndb_mgmd.cnf
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/additions/ndb_mgmd.cnf	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/additions/ndb_mgmd.cnf	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,35 @@
+[NDBD DEFAULT]
+NoOfReplicas=2
+DataMemory=10MB
+IndexMemory=25MB
+MaxNoOfTables=256
+MaxNoOfOrderedIndexes=256
+MaxNoOfUniqueHashIndexes=128
+
+[MYSQLD DEFAULT]
+
+[NDB_MGMD DEFAULT]
+
+[TCP DEFAULT]
+
+[NDB_MGMD]
+Id=1                            # the NDB Management Node (this one)
+HostName=127.0.0.1          
+
+[NDBD]
+Id=2                            # the first NDB Data Node
+HostName=127.0.0.1          
+DataDir= /var/lib/mysql-cluster
+
+[NDBD]
+Id=3                            # the second NDB Data Node
+HostName=127.0.0.1          
+DataDir=/var/lib/mysql-cluster
+
+[MYSQLD]
+Id=4                            # the first SQL node
+HostName=127.0.0.1
+
+# [MYSQLD]
+# Id=5                          # the second SQL node
+# HostName=127.0.0.10

Added: mysql-dfsg-5.0/branches/unstable/debian/changelog
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/changelog	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/changelog	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,3927 @@
+mysql-dfsg-5.0 (5.0.75-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update patches:
+    + debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch
+  * Remove patches:
+    + debian/patches/50_fix_agg_functions.dpatch
+
+ -- Norbert Tretkowski <nobse at debian.org>  Mon, 22 Dec 2008 11:01:38 +0100
+
+mysql-dfsg-5.0 (5.0.67-3) unstable; urgency=low
+
+  * Really apply patch from 5.0.74 to fix check for non-aggregated columns
+    in queries.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Tue, 16 Dec 2008 07:19:23 +0100
+
+mysql-dfsg-5.0 (5.0.67-2) unstable; urgency=low
+
+  * New patch from 5.0.74 to fix check for non-aggregated columns in queries.
+    (closes: #505179, #505181)
+  * Add patch from Dan Munckton:
+    + Clearly indicate that we do not support running multiple instances
+      of mysqld by duplicating the init script.
+      (closes: #314785, #324834, #435165, #444216)
+    + Properly parameterize all existing references to the mysql config
+      file (/etc/mysql/my.cnf).
+  * Really fix FTBFS if build twice in a row. (closes: #442684)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 14 Dec 2008 10:12:30 +0100
+
+mysql-dfsg-5.0 (5.0.67-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update patches:
+    + debian/patches/25_mysys__default.c.dpatch
+    + debian/patches/80_fix_user_setup_on_localhost.dpatch
+  * Remove patches:
+    + debian/patches/50_fix_mysqldump.dpatch
+    + debian/patches/51_incorrect-order.dpatch
+    + debian/patches/52_ndb-gcc-4.2.dpatch
+    + debian/patches/53_integer-gcc-4.2.dpatch
+    + debian/patches/54_ssl-client-support.dpatch
+    + debian/patches/55_testsuite-2008.dpatch
+    + debian/patches/56_fix_order_by.dpatch
+    + debian/patches/57_fix_mysql_replication.dpatch
+    + debian/patches/58_disable-ndb-backup-print.dpatch
+    + debian/patches/59_fix_relay_logs_corruption.dpatch
+    + debian/patches/60_rpl_test_failure.dpatch
+    + debian/patches/90_upstreamdebiandir.dpatch
+    + debian/patches/91_SECURITY_CVE-2007-5925.dpatch
+    + debian/patches/92_SECURITY_CVE-2008-2079.dpatch
+    + debian/patches/93_SECURITY_CVE-2008-3963.dpatch
+  * Fix FTBFS if build twice in a row. (closes: #442684)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 02 Nov 2008 13:51:50 +0100
+
+mysql-dfsg-5.0 (5.0.51a-19) testing-proposed-updates; urgency=low
+
+  * New patch 50_fix_mysqldump2.dpatch from 5.0.60 to fix dumping databases
+    from mysql 4.0 server. (closes: #507789)
+  * Don't create a guest account during bootstrap. (closes: #463704)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Thu, 04 Dec 2008 23:07:19 +0100
+
+mysql-dfsg-5.0 (5.0.51a-18) testing-proposed-updates; urgency=high
+
+  * SECURITY:
+    Fix for CVE-2008-4098: Inadequate validation of paths used in DATA
+    DIRECTORY and INDEX DIRECTORY clauses of CREATE TABLE statements enabled
+    attackers to write to tables in other databases to which they could not
+    ordinarily have access.
+
+ -- Devin Carraway <devin at debian.org>  Tue, 25 Nov 2008 05:38:45 +0000
+
+mysql-dfsg-5.0 (5.0.51a-17) testing-proposed-updates; urgency=low
+
+  * Don't use commented out passwords from debian.cnf. (closes: #453820)
+  * Update watch file to recognize releases > 5.0.45.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 02 Nov 2008 13:31:32 +0100
+
+mysql-dfsg-5.0 (5.0.51a-16) unstable; urgency=low
+
+  * New patch 60_rpl_test_failure.dpatch from 5.0.54 to fix a race condition
+    with the rpl_packet test in some cases. (closes: #501413)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Thu, 09 Oct 2008 08:50:43 +0200
+
+mysql-dfsg-5.0 (5.0.51a-15) unstable; urgency=high
+
+  * SECURITY:
+    Fix for CVE-2008-3963: An empty bit-string literal (b'') caused a server
+    crash. Now the value is parsed as an empty bit value (which is treated as
+    an empty string in string context or 0 in numeric context).
+    (closes: #498362)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 14 Sep 2008 18:27:46 +0200
+
+mysql-dfsg-5.0 (5.0.51a-14) unstable; urgency=low
+
+  * Update debconf translations:
+    - Swedish, from Martin Bagge. (closes: #491688)
+    - Netherlands, from Thijs Kinkhorst. (closes: #492723)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 07 Sep 2008 20:18:31 +0200
+
+mysql-dfsg-5.0 (5.0.51a-13) unstable; urgency=medium
+
+  * New patch 59_fix_relay_logs_corruption.dpatch from 5.0.56 to fix
+    corruption in relay logs. (closes: #463515)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 03 Sep 2008 09:13:46 +0200
+
+mysql-dfsg-5.0 (5.0.51a-12) unstable; urgency=low
+
+  * Disable rpl_ndb_innodb_trans test when running the testsuite, fails
+    randomly on i386. (closes: #494238)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sat, 09 Aug 2008 15:56:45 +0200
+
+mysql-dfsg-5.0 (5.0.51a-11) unstable; urgency=low
+
+  * Disable innodb_handler test when running the testsuite, fails randomly
+    on s390. (closes: #491363)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 23 Jul 2008 08:34:51 +0200
+
+mysql-dfsg-5.0 (5.0.51a-10) unstable; urgency=high
+
+  * Merge testing-security upload to finally fix CVE-2008-2079, thanks to
+    Devin Carraway and Steffen Joeris. (closes: #480292)
+  * New patch 58_disable-ndb-backup-print.dpatch from 5.0.54 to disable
+    ndb_backup_print, ndb_alter_table and ndb_replace tests when running the
+    testsuite. (closes: #474893)
+  * Reenable error handling in testsuite on i386, disabling it was just a
+    workaround for the problem which is now fixed with the above patch.
+  * Update debconf translations:
+    - Vietnamese, from Clytie Siddall. (closes: #486443)
+    - Spanish, from Javier Fernández-Sanguino Peña. (closes: #488740)
+    - Slovak, from helix84. (closes: #489266)
+  * Make lintian happy:
+    - Fix build-dependency on -1 revision.
+    - Fix deprecated chown usage.
+    - Fix spelling error in description.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Tue, 15 Jul 2008 19:37:35 +0200
+
+mysql-dfsg-5.0 (5.0.51a-9+lenny2) testing-security; urgency=high
+
+  * Non-maintainer upload by the security team.
+  * Correct error number in symlink.test to avoid FTBFS on some archs.
+
+ -- Steffen Joeris <white at debian.org>  Sun, 13 Jul 2008 11:44:57 +0000
+
+mysql-dfsg-5.0 (5.0.51a-9+lenny1) testing-security; urgency=high
+
+  * Non-maintainer upload by the security team.
+  * Correct and expand 92_SECURITY_CVE-2008-2079.dpatch to cover all symlinks
+    and check the output of fn_format(). (closes: #480292)
+    Fixes: CVE-2008-2079
+
+ -- Steffen Joeris <white at debian.org>  Sat, 12 Jul 2008 05:30:39 +0000
+
+mysql-dfsg-5.0 (5.0.51a-9) unstable; urgency=low
+
+  * Ignore errors in testsuite on i386. (workaround for #474893)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 25 Jun 2008 15:07:03 +0200
+
+mysql-dfsg-5.0 (5.0.51a-8) unstable; urgency=low
+
+  * New patch 80_fix_user_setup_on_localhost.dpatch from Daniel Hahler to fix
+    a duplicate key error when install MySQL server on a host with hostname
+    localhost. (closes: #478319)
+  * Really fix build on non-linux systems, this time without producing a build
+    error on some architectures. (closes: #485971)
+  * Update debconf translations:
+    - French, from Christian Perrier. (closes: #478553)
+    - German, from Alwin Meschede. (closes: #478672)
+    - Italian, from Luca Monducci. (closes: #479363)
+    - Czech, from Miroslav Kure. (closes: #480924)
+    - Galician, from Jacobo Tarrio. (closes: #480965)
+    - Basque, from Piarres Beobide. (closes: #481840)
+    - Swedish, from Martin Bagge. (closes: #482466, #486307)
+    - Turkish, from Mert Dirik. (closes: #484704)
+    - Russian, from Yuri Kozlov. (closes: #486149)
+    - Finnish, from Esko Arajärvi. (closes: #486554)
+    - Portuguese, from Miguel Figueiredo. (closes: #486709)
+    - Romanian, from Eddy Petrișor. (closes: #486944)
+    - Japanese, from Hideki Yamane. (closes: #487270)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sat, 21 Jun 2008 19:20:48 +0200
+
+mysql-dfsg-5.0 (5.0.51a-7) unstable; urgency=high
+
+  [ Norbert Tretkowski ]
+  * SECURITY:
+    Fix for CVE-2008-2079: It was possible to circumvent privileges through
+    the creation of MyISAM tables employing the DATA DIRECTORY and INDEX
+    DIRECTORY options to overwrite existing table files in the MySQL data
+    directory. Use of the MySQL data directory in DATA DIRECTORY and INDEX
+    DIRECTORY is now disallowed. Patch from openSUSE 11.0, thanks to Michal
+    Marek. (closes: #480292)
+  * Fix build on non-linux systems, like hurd-i386. (closes: #480362)
+  * Include symlinks for mysqlcheck. (closes: #480647)
+
+  [ Monty Taylor ]
+  * Remove ndb_cpcd, as it is only for the NDB test suite and not useful as a
+    public program.
+  * Fix debian-start.inc.sh for table names with characters needing quotes.
+    Thanks Felix Rublack! (closes: #480525, #481154, #481303, #484012) 
+  * Delete mysql-common.README.Debian. Nothing in it was relevant, and the
+    useful information is in mysql-server anyway. (closes: #480940)
+  * Remove a spurious HOME= in logrotate script.  
+
+ -- Norbert Tretkowski <nobse at debian.org>  Thu, 05 Jun 2008 11:49:45 +0200
+
+mysql-dfsg-5.0 (5.0.51a-6) unstable; urgency=low
+
+  * Fix debian-start.inc.sh to not print the row counts of the tables
+    queried. (closes: #478256, #479697)
+
+ -- Monty Taylor <mordred at inaugust.com>  Wed, 14 May 2008 00:47:46 -0700
+
+mysql-dfsg-5.0 (5.0.51a-5) unstable; urgency=medium
+
+  * New patch 57_fix_mysql_replication.dpatch from 5.0.54 to fix directory for
+    relay logs when using replication.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 27 Apr 2008 13:55:04 +0200
+
+mysql-dfsg-5.0 (5.0.51a-4) unstable; urgency=low
+
+  [ Monty Taylor ]
+  * Add Sphinx SE integration.
+  * Remove build of ndb docs, since they are not installed. Removed build deps
+    on TeX and doxygen since that's all they were there for.
+  * Replace script in check_for_crashed_tables with a myisam-recover option
+    and a script to trigger a check of those tables. (thanks HarrisonF and
+    kolbe)
+  * Replace direct calls to test suite with calls to the make targets used by
+    the MySQL build and qa teams for releases.
+  * Add information about Sphinx to README.Maintainer.
+  * Add --skip-ndbcluster to the postinst bootstrap command. It's really a
+    workaround for a bug in 5.1, but it's probably a good idea anyway since we
+    certainly don't need cluster to spin up, and if people have enabled
+    cluster in their my.cnf file, there could be postinst issues if cluster
+    isn't running.
+  * Remove reference to configure options that no longer exist.
+  * Add myself to uploaders.
+
+  [ Norbert Tretkowski ]
+  * New patch 56_fix_order_by.dpatch from Ubuntu to fix ORDER BY not working
+    with GROUP BY. (closes: #471737)
+  * Add note about filename extensions in the /etc/mysql/conf.d/ directory in
+    my.cnf. (closes: #461759)
+  * Confirm password on install, patch from Nicolas Valcárcel.
+    (closes: #471887)
+  * Remove Adam Conrad from uploaders on his request. Thanks for your work in
+    the past!
+  * Use lsb_release to detect distribution.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sat, 05 Apr 2008 21:51:43 +0200
+
+mysql-dfsg-5.0 (5.0.51a-3) unstable; urgency=low
+
+  * Disable patch 60_raise-max-keylength.dpatch in default build, but still
+    ship it in the source package.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 17 Feb 2008 18:54:42 +0100
+
+mysql-dfsg-5.0 (5.0.51a-2) unstable; urgency=low
+
+  * Replace 54_ssl-client-support.dpatch added in 5.0.51-2 with patch from
+    upstream.
+  * Ignore errors in testsuite on powerpc.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 17 Feb 2008 12:42:58 +0100
+
+mysql-dfsg-5.0 (5.0.51a-1) unstable; urgency=low
+
+  [ Norbert Tretkowski ]
+  * New upstream security hotfix release. Low priority upload anyway because
+    5.0.51-3 already contained all security fixes.
+  * Remove patches:
+    + debian/patches/51_mysqlcheck-result.dpatch
+    + debian/patches/92_SECURITY_CVE-2007-6303.dpatch
+    + debian/patches/93_SECURITY_CVE-2007-6304.dpatch
+    + debian/patches/94_SECURITY_CVE-2008-0226+0227.dpatch
+  * Add recommendation on libhtml-template-perl to -server package, used by
+    ndb_size. (closes: #462265)
+  * New patch 60_raise-max-keylength.dpatch to raise the maximum key length to
+    4005 bytes or 1335 UTF-8 characters. (closes: #463137)
+  * New patch 51_sort-order.dpatch from 5.0.52 to fix incorrect order when
+    using range conditions on 2 tables or more.
+  * Support DEB_BUILD_OPTIONS option 'nocheck' to skip tests.
+  * Update mysqlreport to 3.4a release.
+
+  [ Luk Claes ]
+  * Updated Japanese debconf translation. (closes: #462158)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 06 Feb 2008 11:57:45 +0100
+
+mysql-dfsg-5.0 (5.0.51-3) unstable; urgency=high
+
+  * SECURITY:
+    Fix for CVE-2008-0226 and CVE-2008-0227: Three vulnerabilities in yaSSL
+    versions 1.7.5 and earlier were discovered that could lead to a server
+    crash or execution of unauthorized code. The exploit requires a server
+    with yaSSL enabled and TCP/IP connections enabled, but does not require
+    valid MySQL account credentials. The exploit does not apply to OpenSSL.
+    (closes: #460873)
+  * Fix LSB header in init scripts (patch from Petter Reinholdtsen).
+    (closes: #458798)
+  * Run testsuite on all archs, but ignore errors on alpha, arm, armel, hppa,
+    mipsel and sparc. (closes: #460402)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 23 Jan 2008 11:37:11 +0100
+
+mysql-dfsg-5.0 (5.0.51-2) unstable; urgency=low
+
+  [ Monty Taylor ]
+  * Added --with-system-type to set the version_compile_os field.
+  * Cleaned up some lintian warnings.
+  * Removed 43_scripts__mysql_update__password.dpatch since we don't use
+    mysql_upgrade_shell anymore and use mysql_upgrade instead.
+  * Removed 88_mctype_attrib.dpatch, http://bugs.mysql.com/bug.php?id=25118 is
+    closed with http://lists.mysql.com/commits/24337
+  * Added mysql-community/mysql-enterprise virtual packages in provides and
+    conflicts to ease transitions between versions.
+
+  [ Norbert Tretkowski ]
+  * Add -fPIC to CFLAGS to allow other packages to be built against
+    libmysqld.a on amd64. (closes: #457915)
+  * New patch 55_testsuite-2008.dpatch to fix FTBFS in testsuite.
+    (closes: #458695)
+  * New patch 54_ssl-client-support.dpatch to fix SSL client support.
+  * Don't run testsuite on alpha, arm, hppa, mipsel and sparc.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 02 Jan 2008 18:40:04 +0100
+
+mysql-dfsg-5.0 (5.0.51-1) unstable; urgency=low
+
+  * New upstream release.
+    + Fix a crash in mysql_client_test due to gcc 4.x optimizations.
+      (closes: #452558)
+  * Update patches:
+    + debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
+    + debian/patches/89_ndb__staticlib.dpatch
+  * Run testsuite after build.
+  * Re-add manpages, they are licensed under GPL now and redistribution is
+    permitted.
+  * Drop linux-libc-dev build-dependency, it's now being pulled by libc-dev
+    which is build-essential. (closes: #431018)
+  * Remove old optimizations for MySQL 3.23.x, they are no longer required.
+    (closes: #436552)
+  * Don't fail when upgrading mysql-common if $datadir is empty or not defined
+    (patch from Edward Allcutt). (closes: #453127)
+  * New patch from 5.0.52 to fix mysqldump because 'null' is shown as type of
+    fields for view with bad definer. (closes: #454227)
+  * New patch from 5.0.52 to fix mysqlcheck test result.
+  * New patch from 5.0.52 to fix wrong optimization in ndb code when building
+    with gcc 4.2.x.
+  * New patch from 5.0.54 to fix wrong number output due to integer overflow
+    when building with gcc 4.2.x.
+  * New Finnish debconf translation from Esko Arajärvi. (closes: #448776)
+  * Update Basque debconf translation from Aitor Ibañez. (closes: #456193)
+  * Add Vcs-* and Homepage fields to source stanza in control file.
+  * Update mysqlreport to 3.2 release.
+  * Let mysql-server-5.0 pre-depend on debconf, because it's preinst is using
+    it.
+  * Drop menu item for innotop.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Fri, 14 Dec 2007 09:59:36 +0100
+
+mysql-dfsg-5.0 (5.0.45-5) unstable; urgency=high
+
+  * SECURITY:
+    Fix for CVE-2007-6303: ALTER VIEW retained the original DEFINER value,
+    even when altered by another user, which could allow that user to gain the
+    access rights of the view. Now ALTER VIEW is allowed only to the original
+    definer or users with the SUPER privilege. (closes: #455737)
+  * SECURITY:
+    Fix for CVE-2007-6304: When using a FEDERATED table, the local server can
+    be forced to crash if the remote server returns a result with fewer columns
+    than expected.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 12 Dec 2007 20:23:43 +0100
+
+mysql-dfsg-5.0 (5.0.45-4) unstable; urgency=high
+
+  * SECURITY:
+    Fix for CVE-2007-5969: Using RENAME TABLE against a table with explicit
+    DATA DIRECTORY and INDEX DIRECTORY options can be used to overwrite system
+    table information by replacing the file to which the symlink points.
+    (closes: #455010)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 09 Dec 2007 12:29:54 +0100
+
+mysql-dfsg-5.0 (5.0.45-3) unstable; urgency=high
+
+  * SECURITY:
+    Fix for CVE-2007-5925: The convert_search_mode_to_innobase function in
+    ha_innodb.cc in the InnoDB engine in MySQL 5.1.23-BK and earlier allows
+    remote authenticated users to cause a denial of service (database crash)
+    via a certain CONTAINS operation on an indexed column, which triggers an
+    assertion error. (closes: #451235)
+
+ -- Norbert Tretkowski <nobse at debian.org>  Thu, 15 Nov 2007 18:40:11 +0100
+
+mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low
+
+  * Package is now team-maintained. (closes: #421026)
+
+  [ Sean Finney ]
+  * New/updated debconf translations:
+    - Spanish, from Javier Fernández-Sanguino Peña (closes: #426442).
+    - German, from Alwin Meschede (closes: #426545).
+    - Danish, from Claus Hindsgaul (closes: #426783).
+    - French, from Christian Perrier (closes: #430944).
+  * Add Recommends on libterm-readkey-perl for mysql-client-5.0 package, used
+    by mysqlreport add-on to mask password entry (closes: #438375).
+
+  [ Norbert Tretkowski ]
+  * Add myself to uploaders.
+  * Suggest usage of an update statement on the user table to change the mysql
+    root user password instead using mysqladmin, to catch all root users from
+    all hosts. (closes: #435744)
+  * Remove informations about a crash in the server during flush-logs when
+    having expire_logs_days enabled but log-bin not, this bug was fixed in
+    5.0.32 already. (closes: #368547)
+  * Disable log_bin option in default config file and add a note to the NEWS
+    file. (closes: #349661)
+  * Fix FTBFS if build twice in a row. (closes: #442684)
+  * Remove check for buggy options from init script.
+  * Update innotop to 1.6.0 release.
+  * Add mysqlreport and innotop to mysql-client description.
+  * Use shorter server version string.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Wed, 14 Nov 2007 20:00:06 +0100
+
+mysql-dfsg-5.0 (5.0.45-1) unstable; urgency=low
+
+  * New upstream release.
+
+  [sean finney]
+  * removed patches that are incorporated into the latest release:
+    - 70_cpuid_on_i486.dpatch
+    - 91_SECURITY_CVE-2007-2691_alter-drop
+  * new patch 90_upstreamdebiandir.dpatch to keep a few lingering references
+    to the upstream ./debian dir out of the build, at least until we find
+    a nice way to collaborate on sharing the directory.
+  * updated CRUFT list to fix double-build breakage (closes: #424590).
+  * add conditional build-deps for linux-libc-dev to fix FTBFS for
+    non-linux arch's (closes: #431018).
+  * added notes to my.cnf and README.Debian about setting tmpdir when
+    configuring a replication slave.  thanks to Rudy Gevaert for pointing
+    this out (closes: #431825).
+
+ -- sean finney <seanius at debian.org>  Tue, 17 Jul 2007 23:50:33 +0200
+
+mysql-dfsg-5.0 (5.0.41a-1) unstable; urgency=high
+
+  [sean finney]
+  * SECURITY:
+    Fix for CVE-2007-2691: DROP/RENAME TABLE statements (closes: #424778).
+  [Christian Hammers]
+  * Removed all manpages from the source (therefore the "41a") as they 
+    are not licensed under the GPL and redistribution is not permitted
+    (thanks to Mathias Gug). Closes: #430018
+  * Added linux-libc-dev to the build-depends as else an illegal dependency to
+    asm/atomic.h is generated in /usr/include/mysql/my_global.h. Closes: 424276
+  [Christian Perrier]
+  * Debconf templates and debian/control reviewed by the debian-l10n-
+    english team as part of the Smith review project. Closes: #419974
+  * Debconf translation updates:
+    - French. Closes: #422187
+    - Galician. Closes: #420118
+    - Italian. Closes: #421349
+    - Brazilian Portuguese. Closes: #421516
+    - Arabic. Closes: #421751
+    - Czech. Closes: #421766
+    - Portuguese. Closes: #422428
+
+ -- Christian Hammers <ch at debian.org>  Sun, 24 Jun 2007 21:12:42 +0200
+
+mysql-dfsg-5.0 (5.0.41-2) unstable; urgency=low
+
+  * the previous "translation changes" inadvertently introduced unrelated
+    changes in the package control file.
+
+ -- sean finney <seanius at debian.org>  Sun, 13 May 2007 12:32:45 +0200
+
+mysql-dfsg-5.0 (5.0.41-1) unstable; urgency=low
+
+  * New upstream release
+  [sean finney]
+  * Bump the priority of the debconf prompt for the root password to high, to 
+    ensure the question shows up in a default installation (closes: #418672).
+  * Debconf templates and debian/control reviewed by the debian-l10n-
+    english team as part of the Smith review project. Closes: #419974
+  * Debconf translation updates:
+    - French. Closes: #422187
+    - Galician. Closes: #420118
+    - Italian. Closes: #421349
+    - Brazilian Portuguese. Closes: #421516
+    - Arabic. Closes: #421751
+    - Czech. Closes: #421766
+    - Portuguese. Closes: #422428
+  * massaged the local PATH_MAX patch.
+  * removed temp sql parsing patch which has been incorporated upstream
+  * upstream no longer includes the mysql_create_system_tables command,
+    so removed our local patches for it.
+  * the following issues may have been fixed in a previous version of
+    mysql-server-5.0, but the exact version is not clear so they will be
+    marked as fixed in this version. 
+  * lots of NDB-related fixes, including those related to problems with
+    AUTO_INCREMENT (closes: #310878).
+  * fix for "connections remaining in sleep state" (closes: #318011).
+  * fix for "denies queries randomly" (closes: #399602).
+  * problems indexing on char() binary fields were ISAM specific, which is
+    no longer supported (closes: #326698).
+  * fix for problems with "complicated joins" (closes: 348682).
+  * fix for problems with "flushing logs, server crash" (closes: #348682).
+  * fix for AUTO_INCREMENT and duplicate keys (closes: #416145).
+  * fix for "DROP FUNCTIONS doesn't work" (closes: #290670).
+
+ -- sean finney <seanius at debian.org>  Sat, 12 May 2007 12:10:20 +0200
+
+mysql-dfsg-5.0 (5.0.38-3) unstable; urgency=low
+
+  * Added innotop. 
+  * Changed maintainer email address to
+    pkg-mysql-commits at lists.alioth.debian.org 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 19 Apr 2007 19:21:15 +0200
+
+mysql-dfsg-5.0 (5.0.38-2) unstable; urgency=high
+
+  * SECURITY:
+    In some previous versions mysql_install_db was not idempotent and did
+    always create passwordless root accounts although it should only on
+    initial installs (thanks to Olaf van der Spek). Closes: #418672
+  * Added check for passwordless root accounts to debian-start.
+  * As MySQL-5.0 is, at least currently, incompatible with Kernel 2.4 the
+    installation is aborted for such old kernels. Debian Etch does not support
+    them anyway according to the release notes but this might be unexpected
+    and many production servers still have self build ones installed (thanks
+    to Marc-Christian Petersen). See: #416841
+  * Adjusted TeX build-deps to texlive.
+
+ -- Christian Hammers <ch at debian.org>  Tue, 17 Apr 2007 01:00:41 +0200
+
+mysql-dfsg-5.0 (5.0.38-1) unstable; urgency=low
+
+  * New upstream release.
+  * Activated the blackhole engine as it's needed for replicating partition
+    designs (thanks to Cyril SCETBON). 
+  * Fixed segfault on i486 systems without cpuid instruction (thanks to
+    Lennart Sorensen). Closes: #410474
+  * Only use of the non-essential debconf package in postrm if it is still
+    installed (thanks to Michael Ablassmeier). Closes: #416838
+
+ -- Christian Hammers <ch at debian.org>  Thu,  5 Apr 2007 22:43:41 +0200
+
+mysql-dfsg-5.0 (5.0.36-1) unstable; urgency=low
+
+  * New upstream release.
+    Closes: #400460, #408159, #408533
+
+ -- Christian Hammers <ch at debian.org>  Thu, 22 Mar 2007 22:16:31 +0100
+
+mysql-dfsg-5.0 (5.0.32-10) unstable; urgency=high
+
+  * Really fixed FTBFS on Sparc introduced with the "make -j" trick in 
+    5.0.32-8 (thanks to Frank Lichtenheld). Closes: #415026
+
+ -- Christian Hammers <ch at debian.org>  Sun, 18 Mar 2007 20:52:33 +0100
+
+mysql-dfsg-5.0 (5.0.32-9) unstable; urgency=high
+
+  * Fixed FTBFS on Sparc introduced with the "make -j" trick in 5.0.32-8
+    (thanks to Frank Lichtenheld). Closes: #415026
+
+ -- Christian Hammers <ch at debian.org>  Tue, 15 Mar 2007 18:55:42 +0100
+
+mysql-dfsg-5.0 (5.0.32-8) unstable; urgency=high
+
+  [Sean Finney]
+  * SECURITY:
+    - CVE-2007-1420: Single Row Subselect DoS.  Specially crafted subselect
+      queries could crash the mysql server.  Patch backported from upstream
+      changeset 19685 (46_CVE-2007-1420_subselect_dos.dpatch) 
+      closes: #414790.
+  [Christian Hammers]
+  * Adapt MAKE_J to use the -j option with the number of available processors.
+    (thanks to Raphael Pinson).
+  * Updated mysqlreport to latest upstream (and patched --help usage message
+    and "return if qcache_size==0").
+
+ -- sean finney <seanius at debian.org>  Wed, 14 Mar 2007 20:19:08 +0100
+
+mysql-dfsg-5.0 (5.0.32-7) unstable; urgency=low
+
+  * Updated French Debconf translation (thanks to Christian Perrier).
+    Closes: #411330
+  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
+    Closes: #411328
+  * Updated Portuguese Debconf translation (thanks to "Traduz").
+    Closes: #411339
+  * Updated Czech Debconf translation (thanks to Miroslav Kure).
+    Closes: #411341
+  * Added Norwegian Debconf translation (thanks to Bjorn Steensrud).
+    Closes: #411345
+  * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
+    Pena). Closes: #411347
+  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
+    Closes: #411368
+  * Updated Swedish Debconf translation (thanks to Andreas Henriksson).
+    Closes: #411370
+  * Updated Italian Debconf translation (thanks to Luca Monducci).
+    Closes: #411377
+  * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
+    Closes: #411379
+  * Updated Russian Debconf translation (thanks to Yuriy Talakan).
+    Closes: #411442
+  * Updated Basque Debconf translation (thanks to Piarres Beobide).
+    Closes: #411457
+  * Updated German Debconf translation (thanks to Alwin Meschede).
+    Closes: #411480
+  * Updated Dutch Debconf translation (thanks to Thijs Kinkhorst).
+  * Updated Brazilian Portuguese translation (thanks to Andre Luis Lopes).
+    Closes: #411536
+  * Updated Romanian Debconf translation (thanks to Stan Ioan-Eugen). 
+    Closes: #411764
+
+ -- Christian Hammers <ch at debian.org>  Fri, 16 Feb 2007 23:20:42 +0100
+
+mysql-dfsg-5.0 (5.0.32-6) unstable; urgency=low
+
+  * Changed wording in Debconf templates to better fit to the graphical
+    interface (thanks to Frank Kuester). Closes: #411165
+  * Lintian suggested style changes to some other Debconf questions.
+  * Removed accidently stdout output from init script.
+
+ -- Christian Hammers <ch at debian.org>  Fri, 16 Feb 2007 20:29:18 +0100
+
+mysql-dfsg-5.0 (5.0.32-5) unstable; urgency=medium
+
+  * Backported upstream patch for a bug that crashed the server when using
+    certain join/group/limit combinations. 
+    Users of the Joomla CMS seemed to be affected by this. Closes: #403721
+  * The debian-start script that runs on every server start now first upgrades
+    the system tables (if neccessary) and then check them as it sometimes did
+    not work the other way around (e.g. for MediaWiki). The script now uses 
+    mysql_update instead of mysql_update_script as recommended. Closes: 409780
+  * Remove the Debconf generated config file in postrm.
+
+ -- Christian Hammers <ch at debian.org>  Thu, 15 Feb 2007 04:47:04 +0100
+
+mysql-dfsg-5.0 (5.0.32-4) unstable; urgency=high
+
+  [Christian Hammers]
+  * Changed minimum required version in dh_makeshlibs to 5.0.27-1 as
+    5.0.26 had an ABI breakage in it!
+    This is the cause for Perl programs crashing with the following error: 
+    "Transactions not supported by database at /usr/lib/perl5/DBI.pm line 672"
+  * The old_passwords setting that is set according to a Debconf question is
+    now written to /etc/mysql/conf.d/old_passwords.cnf instead directly to the
+    conffile /etc/mysql/my.cnf which would be fobidden by policy (thanks to
+    Robert Bihlmeyer). Closes: #409750
+  * Added some more comments to the default my.cnf.
+  [Monty Taylor]
+  * Added bison to build dependencies.
+  * Added a "start-initial" option to the Data Node init script to support
+    initial node starts.
+  * Changed NDB Data and Management node startup seqence. Prevented both from
+    restarting on upgrade to address rolling upgrade issues.
+  * Updated build-depends to depend on automake1.9 instead of automake1.8
+    to match what upstream uses. 
+
+ -- Christian Hammers <ch at debian.org>  Wed, 31 Jan 2007 01:14:09 +0100
+
+mysql-dfsg-5.0 (5.0.32-3) unstable; urgency=high
+
+  * mysql-server-5.0 pre-depends on adduser now and has --disabled-login
+    explicitly added to be on the safe side (thanks to the puiparts team).
+    Closes: #408362
+  * Corrections the terminology regarding NDB in the comments of all config
+    files and init scripts (thanks to Geert Vanderkelen of MySQL).
+  * Updated Swedish Debconf translation (thanks to Andreas Henriksson).
+    Closes: #407859
+  * Updated Czech Debconf translation (thanks to Miroslav Kure).
+    Closes: #407809
+
+ -- Christian Hammers <ch at debian.org>  Thu, 11 Jan 2007 11:18:47 +0100
+
+mysql-dfsg-5.0 (5.0.32-2) unstable; urgency=high
+
+  * The last upload suffered from a regression that made NDB totally
+    unusable and caused a dependency to libmysqlclient15-dev in the
+    mysql-server-5.0 package. The relevant 85_* patch was re-added again.
+    Closes: #406435
+  * Added lintian-overrides for an error that does not affect our packages.
+    There are now only warnings and not errors left.
+
+ -- Christian Hammers <ch at debian.org>  Tue,  9 Jan 2007 23:55:10 +0100
+
+mysql-dfsg-5.0 (5.0.32-1) unstable; urgency=high
+
+  * New upstream version.
+    * SECURITY: mysql_fix_privilege_tables.sql altered the 
+      table_privs.table_priv column to contain too few privileges, causing
+      loss of the CREATE VIEW and SHOW VIEW privileges. (MySQL Bug#20589)
+    * SECURITY (DoS): ALTER TABLE statements that performed both RENAME TO
+      and {ENABLE|DISABLE} KEYS operations caused a server crash. (MySQL
+      Bug#24089)
+    * SECURITY (DoS): LAST_DAY('0000-00-00') could cause a server crash.
+      (MySQL Bug#23653)
+    * SECURITY (DoS): Using EXPLAIN caused a server crash for queries that 
+      selected from INFORMATION_SCHEMA in a subquery in the FROM clause.
+      (MySQL Bug#22413)
+    * SECURITY (DoS): Invalidating the query cache (e.g. when using stored procedures) 
+      caused a server crash for INSERT INTO ... SELECT statements that 
+      selected from a view. (MySQL Bug#20045)
+    * Using mysql_upgrade with a password crashed the server. Closes: #406229
+    * yaSSL crashed on pre-Pentium Intel and Cyrix CPUs. (MySQL Bug#21765)
+      Closes: #383759
+    * Lots of small fixes to the NDB cluster storage engine.
+  * Updated Japanese Debconf template (thanks to Hideki Yamane).
+    Closes: #405793
+  * Fixed comment regarding "mycheck" in debian-start (thanks to
+    Enrico Zini). Closes: #405787
+
+ -- Christian Hammers <ch at debian.org>  Sat,  6 Jan 2007 14:26:20 +0100
+
+mysql-dfsg-5.0 (5.0.30-3) unstable; urgency=low
+
+  * Updated Brazilian Debconf translation (thanks to Andre Luis Lopes).
+    Closes: #403821
+  * Added Romanian Debconf translation (thanks to Stan Ioan-Eugen).
+    Closes: #403943
+  * Updated Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
+    Pena). Closes: #404084
+  * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
+    Closes: #404318
+  * Updated Dutch Debconf translation (thanks to Vincent Zweije).
+    Closes: #404566
+  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
+    Closes: #405018
+
+ -- Christian Hammers <ch at debian.org>  Thu, 21 Dec 2006 21:35:09 +0100
+
+mysql-dfsg-5.0 (5.0.30-2) unstable; urgency=high
+
+  * Fixed upstream regression in header files that lead to FTBFS for
+    mysql-admin, mysql-query-browser and probably other pacakges.
+    (thanks to Andreas Henriksson). Closes: #403081, #403082
+  * Fixed some upstream scripts by replacing /etc by /etc/mysql (thanks to
+    Julien Antony). Closes: #401083
+  * Updated French Debconf translation (thanks to Christian Perrier).
+    Closes: #401434
+  * Added Spanish Debconf translation (thanks to Javier Fernandez-Sanguino
+    Pena). Closes: #401953
+  * Marked a Debconf question that is just a dummy and only internally
+    used as not-needing-translation. Closes: #403163
+  * Fixed mysqlslowdump patch to not remove the usage() function (thanks 
+    to Monty Tailor).
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Dec 2006 19:20:10 +0100
+
+mysql-dfsg-5.0 (5.0.30-1) unstable; urgency=low
+
+  * New upstream version (switch to the MySQL Enterprise branch).
+  * Upstream bugfix for the Innodb performance bug:
+    "Very poor performance with multiple queries running
+     concurrently (Bug#15815)".
+  * Upstream bugfix for a possible server crash:
+    "Selecting from a MERGE table could result in a server crash if the
+     underlying tables had fewer indexes than the MERGE table itself
+     (Bug#22937)"
+  * Upstream bugfies for *lot* of NDB problems.
+  * Upstream bugfix for Innodb optimizer bug. Closes: #397597
+  * Updated Italian Debconf translation (thanks to Luca Monducci).
+    Closes: #401305 
+  * Updated debian/watch file to MySQL Enterprise branch.
+
+ -- Christian Hammers <ch at debian.org>  Sat,  2 Dec 2006 16:36:38 +0100
+
+mysql-dfsg-5.0 (5.0.27-2) unstable; urgency=medium
+
+  * Disabled YaSSL x86 assembler as it was reported to crash applications
+    like pam-mysql or proftpd-mysql which are linked against libmysqlclient
+    on i486 and Cyrix (i586) CPUs. Closes: #385147
+  * Adjusted mysql-server-4.1 priority to extra and section to oldlibs
+    according to the ftp masters overrides.
+  * Updated German Debconf translation (thanks to Alwin Meschede).
+    Closes: #400809
+
+ -- Christian Hammers <ch at debian.org>  Wed, 22 Nov 2006 13:36:31 +0100
+
+mysql-dfsg-5.0 (5.0.27-1) unstable; urgency=medium
+
+  * New upstream version (but no codechange, the only difference to 5.0.26
+    was a patch to the ABI change which Debian already included.
+  * When dist-upgrading from mysql-server-4.1/sarge dpkg does not longer
+    ask unnecessary "config file has changed" questions regarding
+    /etc/init.d/mysql, /etc/logrotate.d/mysql-server and
+    /etc/mysql/debian-start just because these files previously belonged
+    to mysql-server-4.1 and not to mysql-server-5.0.
+    To archive this mysql-server-5.0 now pre-depends on mysql-common which
+    provides current versions of those files.
+  * The automatic run mysql_upgrade now works with non-standard datadir
+    settings, too (thanks to Benjami Villoslada). Closes: #394607
+  * Debconf now asks if the old_passwords option is really needed.
+  * Improved explanations of the old_passwords variable in my.cnf.
+  * Removed possibly leftover cron script from MySQL-4.1 (thanks to
+    Mario Oyorzabal Salgado). Closes: #390889
+  * Postrm ignores failed "userdel mysql".
+  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
+    Closes: #398784
+  * Added Euskarian Debconf translation (thanks to Piarres Beobide).
+    Closes: #399045
+  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
+    Closes: #399074
+  * Updated German Debconf translation (thanks to Alwin Meschede).
+    Closes: #399087
+  * New Portuguese debconf translations from Miguel Figueiredo. 
+    Closes: #398186
+
+ -- Christian Hammers <ch at debian.org>  Tue,  7 Nov 2006 21:26:25 +0100
+
+mysql-dfsg-5.0 (5.0.26-3) unstable; urgency=high
+
+  [sean finney]
+  * Fix for the deadly ISAM trap.  Now during upgrades we will do our
+    very best to convert pre-existing ISAM format tables using the
+    binaries from the previous package.  Success is not guaranteed, but
+    this is probably as good as it gets.  Note that this also necessitates
+    re-introducing an (empty transitional) mysql-server-4.1 package.
+    Closes: #354544, #354850
+  * Remove a couple spurious and wrongly placed WARNING statements from
+    45_warn-CLI-passwords.dpatch.  thanks to Dan Jacobsen for pointing these
+    out.  Closes: #394262
+
+ -- sean finney <seanius at debian.org>  Fri, 03 Nov 2006 18:34:46 +0100
+
+mysql-dfsg-5.0 (5.0.26-2) unstable; urgency=high
+
+  * Fixed FTBFS for Alpha by applying an upstream patch (thanks to Falk
+    Hueffner). Closes: #395921
+
+ -- Christian Hammers <ch at debian.org>  Sat, 28 Oct 2006 20:13:46 +0200
+
+mysql-dfsg-5.0 (5.0.26-1) unstable; urgency=high
+
+  * SECURITY: 
+    This combined release of 5.0.25 and 5.0.26 fixes lot of possible server
+    crashs so it should get into Etch. Quoting the changelog (bug numbers are
+    bugs.mysql.com ones):
+    - character_set_results can be NULL to signify no conversion, but some
+      code did not check for NULL, resulting in a server crash. (Bug#21913)
+    - Using cursors with READ COMMITTED isolation level could cause InnoDB to
+      crash. (Bug#19834)
+    - Some prepared statements caused a server crash when executed a second
+      time. (Bug#21166)
+    - When DROP DATABASE or SHOW OPEN TABLES was issued while concurrently 
+      issuing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other 
+      statement that required a name lock) in another connection, the server 
+      crashed. (Bug#21216)
+    - Use of zero-length variable names caused a server crash. (Bug#20908)
+    - For InnoDB tables, the server could crash when executing NOT IN () 
+      subqueries. (Bug#21077) 
+    - Repeated DROP TABLE statements in a stored procedure could sometimes
+      cause the server to crash. (Bug#19399)
+    - Performing an INSERT on a view that was defined using a SELECT that 
+      specified a collation and a column alias caused the server to crash 
+      (Bug#21086).
+    - A query of the form shown here caused the server to crash. (Bug#21007)
+    - NDB Cluster: Some queries involving joins on very large NDB tables could
+      crash the MySQL server. (Bug#21059)
+    - The character set was not being properly initialized for CAST() with a
+      type like CHAR(2) BINARY, which resulted in incorrect results or even a 
+      server crash. (Bug#17903)
+    - For certain queries, the server incorrectly resolved a reference to an
+      aggregate function and crashed. (Bug#20868)
+    - The server crashed when using the range access method to execut a
+      subquery with a ORDER BY DESC  clause. (Bug#20869)
+    - Triggers on tables in the mysql database caused a server crash. Triggers
+      for tables in this database now are disallowed. (Bug#18361)
+    - Using SELECT on a corrupt MyISAM table using the dynamic record format 
+      could cause a server crash. (Bug#19835) 
+    - Use of MIN() or MAX()  with GROUP BY on a ucs2  column could cause a
+      server crash. (Bug#20076)
+    - Selecting from a MERGE table could result in a server crash if the
+      underlying tables had fewer indexes than the MERGE table itself. 
+      (Bug#21617, Bug#22937)
+
+  * New upstream release.
+    - This bug would cause trouble for Sarge->Etch upgrades, it was supposed to
+      have been fixed in 5.0.16 but that apparently did not fix the whole
+      problem:
+      Using tables from MySQL 4.x in MySQL 5.x, in particular those with VARCHAR
+      fields and using INSERT DELAYED to update data in the table would result in
+      either data corruption or a server crash. (Bug#16611, Bug#16218, Bug#17294) 
+      Closes: #386337
+    - Fixes data corruption as an automatic client reconnect used to set
+      the wrong character set. Closes: #365050
+    - Fixes an undefined ulong type in an include file. Closes: #389102
+    - Fixes wrong output format when using Unicode characters. Closes: #355302
+    - Fixes mysql_upgrade when using a password. Closes: #371841
+ 
+  [Christian Hammers]
+  * Removed --sysconfdir from debian/rules as it puts /etc/mysql/ at the
+    end of the my.cnf search patch thus overriding $HOME/my.cnf
+    (thanks to Christoph Biedl). Closes: #394992
+  * The provided patch from bug #385947 was wrong, the variable is called
+    BLOCKSIZE not BLOCK_SIZE according to "strings `which df`" (thanks to
+    Bruno Muller). Closes: #385947
+
+  [sean finney]
+  * new dutch debconf translations from Vincent Zweije (closes: #392809).
+  * new japanese debconf translations from Hideki Yamane (closes: #391625).
+  * new italian debconf translations from Luca Monducci (closes: #391741).
+  * new french debconf translations from Christian Perrier (closes: #393334).
+  * ran debconf-updatepo to merge the fuzzies into svn.
+  * massage the following patches so they continue to apply cleanly:
+    - 44_scripts__mysql_config__libs.dpatch to cleanly apply.
+    - 45_warn-CLI-passwords.dpatch
+    - 96_TEMP__libmysqlclient_ssl_symbols.dpatch (note, this patch might
+      no longer be needed, but is retained "just in case" after massaging it)
+  * the following patches have been incorporated upstream:
+    - 70_kfreebsd.dpatch
+    - 80_hurd_mach.dpatch
+    - 87_ps_Hurd.dpatch
+    - 90_TEMP__client__mysql_upgrade__O_EXEC.dpatch
+    - 91_TEMP__client__mysql_upgrade__password.dpatch
+    - 92_TEMP__client__mysql_upgrade__defaultgroups.dpatch
+    - 94_TEMP__CVE-2006-4227.dpatch
+    - 95_TEMP__CVE-2006-4226.dpatch
+  * the udf_example.cc has disappeared from the source code, but there's
+    a udf_example.c which seems to be a good example to use instead :)
+  * update documentation in the configuration to no longer reference
+    using my.cnf in the DATADIR, as it's never been the recommended
+    method for debian systems and hasn't worked since 5.0 was released
+    anyway (closes: #393868).
+
+ -- Christian Hammers <ch at debian.org>  Wed, 25 Oct 2006 19:54:04 +0200
+
+mysql-dfsg-5.0 (5.0.24a-9) unstable; urgency=medium
+
+  * Having expire_logs_days enabled but log-bin not crashes the server. Using
+    both or none of those options is safe. To prevent this happening during the 
+    nightly log rotation via /etc/logrotate.d/mysql the initscript checks for 
+    malicious combination of options. See: #368547
+  * The Sarge package "mysql-server" which used to include the mysqld daemon
+    may still be in unselected-configured state (i.e. after a remove but not
+    purge) in which case its now obsolete cronscript has to be moved away
+    (thanks to Charles Lepple). Closes: #385669
+  * Updated Danish Debconf translation (thanks to Claus Hindsgaul).
+    Closes: #390315
+  * Updated Frensh Debconf translation (thanks to Christian Perrier).
+    Closes: #390980
+
+ -- Christian Hammers <ch at debian.org>  Tue,  3 Oct 2006 14:55:31 +0200
+
+mysql-dfsg-5.0 (5.0.24a-8) unstable; urgency=low
+
+  * (broken upload)
+
+ -- Christian Hammers <ch at debian.org>  Tue,  3 Oct 2006 14:55:31 +0200
+
+mysql-dfsg-5.0 (5.0.24a-7) unstable; urgency=low
+
+  * Stopped mysql_config from announcing unnecessary library dependencies
+    which until now cause "NEEDED" dependencies in the "readelf -d" output
+    of libraries who only depend on libmysqlclient.so (thanks to Michal
+    Cihar). Closes: #390692
+
+ -- Christian Hammers <ch at debian.org>  Sun,  1 Oct 2006 23:59:43 +0200
+
+mysql-dfsg-5.0 (5.0.24a-6) unstable; urgency=low
+
+  [sean finney]
+  * finally add support for setting a root password at install.
+    while this is not a random password as requested in one bug
+    report, we believe it is the best solution and provides a
+    means to set a random password via preseeding if it's really
+    desired (Closes: #316127, #298295).
+
+ -- sean finney <seanius at debian.org>  Sun, 01 Oct 2006 23:34:30 +0200
+
+mysql-dfsg-5.0 (5.0.24a-5) unstable; urgency=low
+
+  * Added ${shlibs:Depends} to debian/control section libmysqlclient-dev as it
+    contains the experimental /usr/lib/mysql/libndbclient.so.0.0.0.
+  * Bumped standards version to 3.7.2.
+  * Added LSB info section to init scripts.
+  * Rephrased Debconf templates as suggested by lintian.
+  * Added benchmark suite in /usr/share/mysql/sql-bench/.
+  * The mysql.timezone* tables are now filled by the postinst script (thanks
+    to Mark Sheppard). Closes: #388491
+  * Moved Debconf install notes to README.Debian. Displaying them with
+    medium priority was a bug anyway. Closes: #388941
+  * Replaced /usr/bin/mysql_upgrade by /usr/bin/mysql_upgrade_shell in
+    /etc/mysql/debian-start.sh as it works without errors (thanks to Javier
+    Kohen). Closes: #389443
+
+ -- Christian Hammers <ch at debian.org>  Wed, 20 Sep 2006 15:01:42 +0200
+
+mysql-dfsg-5.0 (5.0.24a-4) unstable; urgency=high
+
+  * libmysqlclient.so.15 from 5.0.24 accidentaly exports some symbols that are
+    historically exported by OpenSSL's libcrypto.so. This bug was supposed to
+    be fixed in 5.0.24a bug according to the mysql bug tracking system will
+    only be fixed in 5.0.25 so I backported the patch. People already reported
+    crashing apps due to this (thanks to Duncan Simpson). See also: #385348
+    Closes: #388262
+  * Fixed BLOCKSIZE to BLOCK_SIZE in initscript (thanks to Bruno Muller).
+    Closes: #385947
+  * Added hint to "--extended-insert=0" to mysqldump manpage (thanks to Martin
+    Schulze).
+  * Documented the meaning of "NDB" in README.Debian (thanks to Dan Jacobson).
+    Closes: #386274
+  * Added patch to build on hurd-i386 (thanks to Cyril Brulebois). Closes: #387369
+  * Fixed debian-start script to work together with the recend LSB modifications in
+    the initscript (thanks to wens). Closes: #387481
+  * Reverted tmpdir change in my.cnf back to /tmp to comply with FHS (thanks
+    to Alessandro Valente). Closes: #382778
+  * Added logcheck filter rule (thanks to Paul Wise). Closes: #381043
+  * I will definetly not disable InnoDB but added a note to the default my.cnf
+    that disabling it saves about 100MB virtual memory (thanks to Olivier
+    Berger). Closes: #384399
+  * Added thread_cache_size=8 to default my.cnf as this variable seems to have
+    a negligible memory footprint but can improve performance when lots of
+    threads connect simultaneously as often seen on web servers.
+
+ -- Christian Hammers <ch at debian.org>  Mon,  4 Sep 2006 00:21:50 +0200
+
+mysql-dfsg-5.0 (5.0.24a-3) unstable; urgency=low
+
+  * Fixed potential tempfile problem in the newly added mysqlreport script.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Sep 2006 23:17:24 +0200
+
+mysql-dfsg-5.0 (5.0.24a-2) unstable; urgency=low
+
+  * Added "mysqlreport" (GPL'ed) from hackmysql.com.
+  * Temporarily disabled expire_days option as it causes the server
+    to crash. See #368547
+  * Made output of init scripts LSB compliant (thanks to David Haerdeman).
+    Closes: #385874
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Sep 2006 19:06:53 +0200
+
+mysql-dfsg-5.0 (5.0.24a-1) unstable; urgency=high
+
+  * New upstream version.
+  * The shared library in the 5.0.24 upstream release accidently exported 
+    some symbols that are also exported by the OpenSSL libraries (notably
+    BN_bin2bn) causing unexpected behaviour in applications using these 
+    functions (thanks to Peter Cernak). Closes: #385348
+  * Added note about possible crash on certain i486 clone CPUs.
+  * Made recipient address of startup mysqlcheck output configurable
+    (thanks to Mattias Guns). Closes: #385119
+
+ -- Christian Hammers <ch at debian.org>  Mon, 28 Aug 2006 01:22:12 +0200
+
+mysql-dfsg-5.0 (5.0.24-3) unstable; urgency=high
+
+  * SECURITY:
+    CVE-2006-4226:
+    When run on case-sensitive filesystems, MySQL allows remote
+    authenticated users to create or access a database when the database 
+    name differs only in case from a database for which they have
+    permissions.
+    CVE-2006-4227:
+    MySQL evaluates arguments of suid routines in the security context of
+    the routine's definer instead of the routine's caller, which allows
+    remote authenticated users to gain privileges through a routine that 
+    has been made available using GRANT EXECUTE.
+    Thanks to Stefan Fritsch for reporting. Closes: #384798
+
+ -- Christian Hammers <ch at debian.org>  Sat, 26 Aug 2006 04:55:17 +0200
+
+mysql-dfsg-5.0 (5.0.24-2) unstable; urgency=high
+
+  * 5.0.24-1 introduced an ABI incompatibility, which this patch reverts.
+    Programs compiled against 5.0.24-1 are not compatible with any other
+    version and needs a rebuild.
+    This bug already caused a lot of segfaults and crashes in various 
+    programs. Thanks to Chad MILLER from MySQL for quickly providing a patch.
+    The shlibdeps version has been increased to 5.0.24-2.
+    Closes: #384047, #384221, #383700
+
+ -- Christian Hammers <ch at debian.org>  Fri, 25 Aug 2006 21:47:35 +0200
+
+mysql-dfsg-5.0 (5.0.24-1) unstable; urgency=high
+ 
+  * SECURITY: Upstream fixes a security bug which allows a user to continue
+    accessing a table using a MERGE TABLE after the right to direct access to
+    the database has been revoked (CVE-2006-4031, MySQL bug #15195).
+    (Well they did not exactly fixed it, they documented the behaviour and
+    allow the admin to disable merge table alltogether...). Closes: #380271
+  * SECURITY: Applied patch that fixes a possibly insecure filehandling
+    in the recently added mysql_upgrade binary file (MySQL bug #10320).
+  * New upstream version.
+    - Fixes nasty MySQL bug #19618 that leads to crashes when using
+      "SELECT ... WHERE ... not in (1, -1)" (e.g. vbulletin was affected).
+    - Fixes upstream bug #16803 so that linking ~/.mysql_history to /dev/null
+      now has the desired effect of having no history.
+  * Really fixed the runlevels. Closes: #377651
+  * Added patch for broken upstream handling of "host=" to mysql_upgrade.c.
+  * Adjusted /etc/mysql/debian-start to new mysql_upgrade.c
+
+ -- Christian Hammers <ch at debian.org>  Tue,  8 Aug 2006 00:44:13 +0200
+
+mysql-dfsg-5.0 (5.0.22-5) unstable; urgency=low
+
+  * Added further line to the logcheck ignore files (thanks to Paul Wise).
+    Closes: #381038
+
+ -- Christian Hammers <ch at debian.org>  Wed,  2 Aug 2006 00:28:50 +0200
+
+mysql-dfsg-5.0 (5.0.22-4) unstable; urgency=low
+
+  * Upstream fixes a bug in the (never released) version 5.0.23 which could
+    maybe used to crash the server if the mysqlmanager daemon is in use
+    which is not yet the default in Debian. (CVE-2006-3486 *DISPUTED*)
+  * Changed runlevel priority of mysqld from 20 to 19 so that it gets started
+    before apache and proftpd etc. which might depend on an already running
+    database server (thanks to Martin Gruner). Closes: #377651
+  * Added patch which sets PATH_MAX in ndb (thanks to Cyril Brulebois).
+    Closes: #378949
+  * Activated YaSSL as licence issues are settled according to:
+    http://bugs.mysql.com/?id=16755. This also closes the FTBFS bug
+    regarding OpenSSL as it is discouraged to use now. Closes: #368639
+  * Removed SSL-MINI-HOWTO as the official documentation is good enough now.
+  * mysql_upgrade no longer gives --password on the commandline which would
+    be insecure (thanks to Dean Gaudet). Closes: #379199
+  * Adjusted debian/patches/45* to make consecutive builds in the same source
+    tree possible (thanks to Bob Tanner). Closes: #368661
+  * mysql-server-5.0 is now suggesting tinyca as yaSSL is enabled and tinyca
+    was found to be really cool :)
+  * Moved tempdir from /tmp to /var/tmp as it will more likely have enough
+    free space as /tmp is often on the root partition and /var or at least
+    /var/tmp is on a bigger one.
+
+ -- Christian Hammers <ch at debian.org>  Mon, 10 Jul 2006 23:30:26 +0200
+
+mysql-dfsg-5.0 (5.0.22-3) unstable; urgency=low
+
+  * Added patch for MySQL bug #19618: "select x from x
+    where x not in(1,-1)" may crash the server" (thanks to
+    Ruben Puettmann).
+
+ -- Christian Hammers <ch at debian.org>  Fri,  9 Jun 2006 01:41:44 +0200
+
+mysql-dfsg-5.0 (5.0.22-2) unstable; urgency=high
+
+  * Fixed debian-sys-maint related bug in postinst (thanks to
+    Jean-Christophe Dubacq). Closes: #369970
+  * The last upload was a security patch (which I did not know as I
+    uploaded before the announcement came). I now added the CVE id for
+    reference and set urgency to high as the last entry did not.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 31 May 2006 01:04:11 +0200
+
+mysql-dfsg-5.0 (5.0.22-1) unstable; urgency=low
+
+  * SECURITY: This upstream release fixes an SQL-injection with multibyte 
+    encoding problem. (CVE-2006-2753)
+  * New upstream release.
+  * Upstream fixes REPAIR TABLE problem. Closes: #354300
+  * Upstream fixes problem that empty strings in varchar and text columns
+    are displayed as NULL. Closes: #368663
+
+ -- Christian Hammers <ch at debian.org>  Tue, 30 May 2006 23:43:24 +0200
+
+mysql-dfsg-5.0 (5.0.21-4) unstable; urgency=low
+
+  * Added "BLOCKSIZE=" to the diskfree check (thanks to Farzad FARID).
+    Closes: #367027, #367083
+  * Further fixed mysql_upgrade upstream script (thanks to Andreas Pakulat)
+    Closes: #366155
+  * Adjusted the /proc test in debian/rules from /proc/1 to /proc/self
+    to make building on grsec systems possible (thanks to K. Rosenegger).
+    Closes: #366824
+  * Updated Russion Debconf translation (thanks to Yuriy Talakan).
+    Closes: #367141
+  * Updated Czech Debconf translation (thanks to Kiroslav Kure).
+    Closes: #367160
+  * Updated Galician Debconf translation (thanks to Jacobo Tarrio).
+    Closes: #367384
+  * Updated Swedish Debconf translation (thanks to Daniel Nylander).
+    Closes: #368186
+
+ -- Christian Hammers <ch at debian.org>  Wed, 10 May 2006 08:45:42 +0200
+
+mysql-dfsg-5.0 (5.0.21-3) unstable; urgency=low
+
+  * Fixed FTBFS problem which was caused by a patch that modifies Makefile.am
+    as well as Makefile.in and was not deteced because my desktop was fast
+    enough to patch both files within the same second and so fooled automake.
+    (thanks to Blars Blarson for notifying me). Closes: #366534
+
+ -- Christian Hammers <ch at debian.org>  Sat,  6 May 2006 19:03:58 +0200
+
+mysql-dfsg-5.0 (5.0.21-2) unstable; urgency=low
+
+  * Fixed bug in postinst that did not correctly rewrite 
+    /etc/mysql/debian.cnf (thanks to Daniel Leidert). 
+    Closes: #365433, #366155
+
+ -- Christian Hammers <ch at debian.org>  Thu,  4 May 2006 02:37:03 +0200
+
+mysql-dfsg-5.0 (5.0.21-1) unstable; urgency=high
+
+  * SECURITY: New upstream release with some security relevant bugfixes:
+    * "Buffer over-read in check_connection with usernames lacking a
+      trailing null byte" (CVE-2006-1516)
+    * "Anonymous Login Handshake - Information Leakage" (CVE-2006-1517)
+    * "COM_TABLE_DUMP Information Leakage and Arbitrary command execution"
+       (CVE-2006-1518)
+    Closes: #365938, #365939
+  * Added diskfree check to the init script (thanks to Tim Baverstock).
+    Closes: #365460
+  * First amd64 upload!
+
+ -- Christian Hammers <ch at debian.org>  Sat, 29 Apr 2006 04:31:27 +0200
+  
+mysql-dfsg-5.0 (5.0.20a-2) unstable; urgency=low
+
+  * The new mysql-upgrade which is started from /etc/mysql/debian-start
+    does now use the debian-sys-maint user for authentication (thanks to
+    Philipp). Closes: #364991
+  * Wrote patch debian/patches/43* which adds a password option to
+    mysql_update. See MySQL bug #19400.
+  * Added "Provides: libmysqlclient-dev" to libmysqlclient15-dev as I saw no
+    obvious reasons against it (problems should be documented in
+    debian/README.Maintainer!) (thanks to Olaf van der Spek). Closes: #364899
+  * Updated Netherlands debconf translation (thanks to Vincent Zweije)
+    Closes: #364464
+  * Updated French debconf translation (thanks to Christian Perrier)
+    Closes: #364401
+  * Updated Danish debconf translation (thanks to Claus Hindsgaul)
+    Closes: #365135
+
+ -- Christian Hammers <ch at debian.org>  Wed, 26 Apr 2006 01:14:53 +0200
+
+mysql-dfsg-5.0 (5.0.20a-1) unstable; urgency=low
+
+  * New upstream release.
+  * Added the new mysql_upgrade script and added it to
+    /etc/mysql/debian-start (thanks to Alessandro Polverini). 
+    The script is currently very noise that is a known bug and will be
+    fixed in the next release!
+    Closes: #363458
+  * No longer creates the "test" database. This actuallay had been tried
+    to archive before (at least patches) exists but apparently was not the
+    case in the last versions (thanks to Olaf van der Spek). Closes: #362126
+  * Reformatted libmysqlclient15off.NEWS.Debian to changelog format
+    (thanks to Peter Palfrader). Closes: #363062
+
+ -- Christian Hammers <ch at debian.org>  Sat, 15 Apr 2006 13:05:22 +0200
+
+mysql-dfsg-5.0 (5.0.20-1) unstable; urgency=high
+
+  * Upstream contains a fix for a nasty bug (MySQL#18153) that users 
+    already experienced and that caused corrupted triggers after
+    REPAIR/OPTIMIZE/ALTER TABLE statements.
+    (thanks to Jerome Despatis for pointing out)
+  * Added patch for the "updates on multiple tables is buggy after 
+    upgrading from 4.1 to 5.0" problem which MySQL has been committed
+    for the upcoming 5.0.21 release. Closes #352704
+  * Added Netherlands debconf translation (thanks to Vincent Zweije).
+    Closes: #360443
+  * Added Galician debconf translation (thanks to Jacobo Tarrio).
+    Closes: #361257
+
+ -- Christian Hammers <ch at debian.org>  Fri,  7 Apr 2006 00:00:43 +0200
+
+mysql-dfsg-5.0 (5.0.19-3) unstable; urgency=high
+
+  [ Christian Hammers ]
+  * Fixed libmysqlclient15.README.Debian regarding package name changes
+    (thanks to Leppo).
+  * Moved libheap.a etc. back to /usr/lib/mysql/ as their names are just
+    too generic. Closes: #353924
+  [ Sean Finney ]
+  * updated danish debconf translation, thanks to Claus Hindsgaul
+    (closes: #357424).
+  [ Adam Conrad ]
+  * Send stderr from 'find' in preinst to /dev/null to tidy up chatter.
+  * Backport patch for CVE-2006-0903 from the upcoming release to resolve
+    a log bypass vulnerability when using non-binary logs (closes: #359701)
+
+ -- Adam Conrad <adconrad at 0c3.net>  Tue,  4 Apr 2006 15:23:18 +1000
+
+mysql-dfsg-5.0 (5.0.19-2) unstable; urgency=medium
+
+  * New upstream release.
+  * Renamed package libmysqlclient15 to libmysqlclient15off due to
+    binary incompatible changes.
+    See /usr/share/doc/libmysqlclient15off/README.Debian
+  * Updated Czech debconf translation (thanks to Miroslav Kure).
+    Closes: #356503
+  * Updated French debconf translation (thanks to Christian Perrier).
+    Closes: #356332
+  * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702
+  * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian
+    file is (thanks to Ross Boylan). Closes: #355978
+
+ -- Christian Hammers <ch at debian.org>  Fri, 17 Mar 2006 02:32:19 +0100
+
+mysql-dfsg-5.0 (5.0.19-1) experimental; urgency=medium
+
+  * New upstream release.
+  * SECURITY: CVE-2006-3081: A bug where str_to_date(1,NULL) lead to a 
+    server crash has been fixed. 
+    (this note has been added subsequently for reference)
+  * Renamed package libmysqlclient15 to libmysqlclient15off.
+    See /usr/share/doc/libmysqlclient15off/NEWS.Debian
+  * Updated Czech debconf translation (thanks to Miroslav Kure).
+    Closes: #356503
+  * Updated French debconf translation (thanks to Christian Perrier).
+    Closes: #356332
+  * Improved README.Debian (thanks to Olaf van der Spek). Closes: #355702
+  * Fixed 5.0.18-8 changelog by saying in which package the NEWS.Debian
+    file is (thanks to Ross Boylan). Closes: #355978
+
+ -- Christian Hammers <ch at debian.org>  Tue, 14 Mar 2006 22:56:13 +0100
+
+mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=medium
+
+  [ Christian Hammers ]
+  * When using apt-get the check for left-over ISAM tables can abort the
+    installation of mysql-server-5.0 but not prevent the mysql-server-4.1
+    package from getting removed. The only thing I can do is reflect this
+    in the Debconf notice that is shown and suggest to reinstall
+    mysql-server-4.1 for converting. See: #354850
+  * Suggests removing of /etc/cron.daily/mysql-server in last NEWS message
+    (thanks to Mourad De Clerck). Closes: #354111
+  * Added versioned symbols for kfreebsd and Hurd, too (thanks to Aurelien
+    Jarno and Michael Bank). Closes: #353971 
+  * Added versioned symbols for kfreebsd, too (thanks to Aurelien Jarno).
+    Closes: #353971
+  [ Adam Conrad ]
+  * Add 39_scripts__mysqld_safe.sh__port_dir.dpatch to ensure that the
+    permissions on /var/run/mysqld are always correct, even on a tmpfs.
+
+ -- Christian Hammers <ch at debian.org>  Mon,  6 Mar 2006 21:42:13 +0100
+
+mysql-dfsg-5.0 (5.0.18-8) unstable; urgency=low
+
+  * The rotation of the binary logs is now configured via
+    expire-logs-days in /etc/mysql/my.cnf and handled completely
+    by the server and no longer in configured in debian-log-rotate.conf
+    and handled by a cron job. Thanks to David Johnson.
+    See /usr/share/doc/mysql-server-5.0/NEWS.Debian
+  * Ran aspell over some files in debian/ and learned a lot :)
+  * debian/rules: Added check if versioned symbols are really there.
+  * Updated SSL-MINI-HOWTO.
+  * Updated copyright (removed the parts regarding the now removed
+    BerkeleyDB table handler and mysql-doc package).
+  * Relocated a variable in preinst (thanks to Michael Heldebrant).
+    Closes: #349258, #352587, #351216
+  * Updated Danish debconf translation (thanks to Claus Hindsgaul).
+    Closes: #349013  
+  * Updated Swedish debconf translation (thanks to Daniel Nylander).
+    Closes: #349522
+  * Updated French debconf translation (thanks to Christian Perrier).
+    Closes: #349592
+  * Fixed typo in README.Debian (thanks to Vincent Ricard).
+  * Prolonged waiting time for mysqld in the init script. Closes: #352070
+
+ -- Christian Hammers <ch at debian.org>  Mon, 23 Jan 2006 23:13:46 +0100
+
+mysql-dfsg-5.0 (5.0.18-7) unstable; urgency=low
+
+  * Made mailx in debian-start.inc.sh optional and changed the dependency on it
+    on it to a mere recommendation. Closes: #316297
+  * the previous FTBFS patches for GNU/Hurd inadvertently led to configure
+    being regenerating, losing a couple trivial things like our versioned
+    symbols patch, causing many nasty problems (closes: #348854).
+
+ -- sean finney <seanius at debian.org>  Fri, 20 Jan 2006 20:59:27 +0100
+
+mysql-dfsg-5.0 (5.0.18-6) unstable; urgency=low
+
+  * Added version comment (thanks to Daniel van Eeden). 
+  * Added two patches to build on GNU/Hurd (thanks to Michael Bank).
+    Closes: #348182
+  * Abort upgrade if old and now unsupported ISAM tables are present
+    (thanks to David Coe). Closes: #345895
+
+ -- Christian Hammers <ch at debian.org>  Tue, 17 Jan 2006 19:25:59 +0100
+
+mysql-dfsg-5.0 (5.0.18-5) unstable; urgency=low
+
+  * Bump shlibdeps for libmysqlclient15 to (>= 5.0.15-1), which was
+    the first non-beta release from upstream, as well as being shortly
+    after we broke the ABI in Debian by introducing versioned symbols.
+
+ -- Adam Conrad <adconrad at 0c3.net>  Fri, 13 Jan 2006 13:18:03 +1100
+
+mysql-dfsg-5.0 (5.0.18-4) unstable; urgency=low
+
+  * Munge our dependencies further to smooth upgrades even more, noting
+    that we really need 5.0 to conflict with 4.1, and stealing a page from
+    the book of mysql-common, it doesn't hurt to hint package managers in
+    the direction of "hey, this stuff is a complete replacement for 4.1"
+  * Change the description of mysql-server and mysql-client to remove the
+    references to it being "transition", and instead point out that it's
+    the way to get the "current best version" of each package installed.
+
+ -- Adam Conrad <adconrad at 0c3.net>  Wed, 11 Jan 2006 11:39:45 +1100
+
+mysql-dfsg-5.0 (5.0.18-3) unstable; urgency=low
+
+  * Make the mysql-{client,server}-5.0 conflict against mysql-{client,server}
+    versioned, so they can be installed side-by-side and upgrade properly.
+  * Add myself to Uploaders; since I have access to the alioth repository.
+
+ -- Adam Conrad <adconrad at 0c3.net>  Tue, 10 Jan 2006 19:15:48 +1100
+
+mysql-dfsg-5.0 (5.0.18-2) unstable; urgency=low
+
+  * Removed the transitional package that forced an upgrade from
+    mysql-server-4.1 to mysql-server-5.0 as I was convinced that
+    having a general "mysql-server" package with adjusted dependencies
+    is enough (thanks to Adam Conrad).
+  * Updated logcheck.ignore files (thanks to Jamie McCarthy). Closes: #340193
+
+ -- Christian Hammers <ch at debian.org>  Mon,  9 Jan 2006 21:54:53 +0100
+
+mysql-dfsg-5.0 (5.0.18-1) unstable; urgency=low
+
+  * New upstream version. 
+  * Added empty transitional packages that force an upgrade from the
+    server and client packages that have been present in Sarge.
+  * Fixed SSL-MINI-HOWTO (thanks to Jonas Smedegaard). Closes: #340589 
+
+ -- Christian Hammers <ch at debian.org>  Mon,  2 Jan 2006 21:17:51 +0100
+
+mysql-dfsg-5.0 (5.0.17-1) unstable; urgency=low
+
+  * Never released as Debian package.
+
+ -- Christian Hammers <ch at debian.org>  Thu, 22 Dec 2005 07:49:52 +0100
+
+mysql-dfsg-5.0 (5.0.16-1) unstable; urgency=low
+
+  * New upstream version.
+  * Removed the error logs from the logrotate script as Debian does
+    not use them anymore. Closes: #339628
+
+ -- Christian Hammers <ch at debian.org>  Tue, 22 Nov 2005 01:19:11 +0100
+
+mysql-dfsg-5.0 (5.0.15-2) unstable; urgency=medium
+
+  * Added 14_configure__gcc-atomic.h.diff to fix FTBFS on m68k
+    (thanks to Stephen R Marenka). Closes: #337082
+  * Removed dynamic linking against libstdc++ as it was not really
+    needed (thanks to Adam Conrad). Closes: #328613
+  * Fixed the "/var/lib/mysql is a symlink" workaround that accidently
+    left a stalled symlink (thanks to Thomas Lamy). Closes: #336759
+  * As the init script cannot distinguish between a broken startup and
+    one that just takes very long the "failed" message now says
+    "or took more than 6s" (thanks to Olaf van der Spek). Closes: #335547
+
+ -- Christian Hammers <ch at debian.org>  Thu,  3 Nov 2005 22:00:15 +0100
+
+mysql-dfsg-5.0 (5.0.15-1) unstable; urgency=low
+
+  * New upstream version. 5.0 has finally been declared STABLE!
+  * Added small patch to debian/rules that fixed sporadic build errors
+    where stdout and stderr were piped together, got mixed up and broke
+  * Added --with-big-tables to ./configure (thanks to tj.trevelyan).
+    Closes: #333090
+  * Added capability to parse "-rc" to debian/watch.
+  * Fixed cronscript (thanks to Andrew Deason). Closes: #335244
+  * Added Swedish debconf translation (thanks to Daniel Nylander).
+    Closes: #333670
+  * Added comment to README.Debian regarding applications that manually
+    set new-style passwords... Closes: #334444
+  * Sean Finney:
+    - Fix duplicate reference to [-e|--extended-insert]. Closes: #334957
+    - Fix default behavior for mysqldumpslow. Closes: #334517
+    - Reference documentation issue in mysql manpage. Closes: #335219
+
+ -- Christian Hammers <ch at debian.org>  Fri, 30 Sep 2005 00:10:39 +0200
+
+mysql-dfsg-5.0 (5.0.13rc-1) unstable; urgency=low
+
+  * New upstream release. Now "release-candidate"! 
+  * Removed any dynamic link dependencies to libndbclient.so.0 which
+    is due to its version only distributed as a static library.
+  * Sean Finney:
+    - FTBFS fix related to stripping rpath in debian/rules
+
+ -- Christian Hammers <ch at debian.org>  Mon, 26 Sep 2005 22:09:26 +0200
+
+mysql-dfsg-5.0 (5.0.12beta-5) unstable; urgency=low
+
+  * The recent FTBFS were probably result of a timing bug in the
+    debian/patches/75_*.dpatch file where Makefile.in got patched just
+    before the Makefile.shared which it depended on. For that reason
+    only some of the autobuilders failed. Closes: #330149
+  * Fixed chrpath removal (option -k had to be added).
+  * Corrected debconf dependency as requested by Joey Hess.
+
+ -- Christian Hammers <ch at debian.org>  Mon, 26 Sep 2005 18:37:07 +0200
+
+mysql-dfsg-5.0 (5.0.12beta-4) unstable; urgency=low
+
+  * Removed experimental shared library libndbclient.so.0.0.0 as it
+    is doomed to cause trouble as long as it is present in both MySQL 4.1
+    and 5.0 without real soname and its own package. We still have
+    libndbclient.a for developers. (thanks to Adam Conrad and 
+    mediaforest.net). Closes: #329772
+
+ -- Christian Hammers <ch at debian.org>  Fri, 23 Sep 2005 12:36:48 +0200
+
+mysql-dfsg-5.0 (5.0.12beta-3) unstable; urgency=medium
+
+  * Symbol versioning support!  wooooohoooooo!
+    (thanks to Steve Langasek) Closes: #236288
+  * Moved libndbcclient.so.0 to the -dev package as it is provided by
+    libmysqlclient14 and -15 which must be installable simultaneously.
+  * Removed mysql-*-doc suggestions.
+
+ -- Christian Hammers <ch at debian.org>  Tue, 20 Sep 2005 00:07:03 +0200
+
+mysql-dfsg-5.0 (5.0.12beta-2) unstable; urgency=low
+
+  * Added patch to build on GNU/kFreeBSD (thanks to Aurelien Jarno).
+    Closes: #327702
+  * Added patch that was already been present on the 4.1 branch which
+    makes the "status" command of the init script more sensible
+    (thanks to Stephen Gildea). Closes: #311836
+  * Added Vietnamese Debconf translation (thanks to Clytie Siddal).
+    Closes: #313006
+  * Updated German Debconf translation (thanks to Jens Seidel).
+    Closes: #313957
+  * Corrected commends in example debian-log-rotate.conf. The default is
+    unlike the mysql-sever-4.1 package which needed to stay backwards
+    compatible now 2 to avoid filling up the disk endlessly.
+  * Fixed watch file to be "-beta" aware.
+
+ -- Christian Hammers <ch at debian.org>  Thu, 15 Sep 2005 20:50:19 +0200
+
+mysql-dfsg-5.0 (5.0.12beta-1) unstable; urgency=medium
+
+  * Christian Hammers:
+    - New upstream release.
+    - Changed build-dep to libreadline5-dev as requested by Matthias Klose.
+      Closes: #326316
+    - Applied fix for changed output format of SHOW MASTER LOGS for
+      binary log rotation (thanks to Martin Krueger). Closes: #326427, #326427
+    - Removed explicit setting of $PATH as I saw no sense in it and
+      it introduced a bug (thanks to Quim Calpe). Closes: #326769
+    - Removed PID file creation from /etc/init.d/mysql-ndb as it does
+      not work with this daemon (thanks to Quim Calpe).
+    - Updated French Debconf translation (thanks to Christian Perrier).
+      Closes: #324805
+    - Moved conflicts line in debian/control from libmysqlclient15 to
+      libmysqlclient15-dev and removed some pre-sarge conflicts as
+      suggested by Adam Majer. Closes: #324623
+  * Sean Finney:
+    - For posterity, CAN-2005-2558 has been fixed since 5.0.7beta.
+
+ -- Christian Hammers <ch at debian.org>  Thu, 15 Sep 2005 19:58:22 +0200
+
+mysql-dfsg-5.0 (5.0.11beta-3) unstable; urgency=low
+
+  * Temporarily build only with -O2 to circumvent gcc internal errors
+    (thanks to Matthias Klose). Related to: #321165 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 18 Aug 2005 15:44:04 +0200
+
+mysql-dfsg-5.0 (5.0.11beta-2) unstable; urgency=low
+
+  * Fixed README.Debian regarding the status of mysql-doc.
+  * Added "set +e" around chgrp in mysql-server-5.0.preinst to
+    not fail on .journal files (thanks to Christophe Nowicki).
+    Closes: #318435
+
+ -- Christian Hammers <ch at debian.org>  Sun, 14 Aug 2005 18:02:08 +0200
+
+mysql-dfsg-5.0 (5.0.11beta-1) unstable; urgency=low
+
+  * New upstream version. 
+  * Added Danish Debconf translations (thanks to Claus Hindsgaul).
+    Closes: #322384
+  * Updated Czech Debconf translations (thanks to Miroslav Kure).
+    Closes: #321765
+
+ -- Christian Hammers <ch at debian.org>  Sat, 13 Aug 2005 11:56:15 +0000
+
+mysql-dfsg-5.0 (5.0.10beta-1) unstable; urgency=low
+
+  * New upstream release.
+  * Christian Hammers:
+    - Added check for mounted /proc to debian/rules.
+  * Sean Finney:
+    - fix for fix_mysql_privilege_tables/mysql_fix_privilege_tables typo
+      in mysql-server-5.0's README.Debian (see #319838).
+
+ -- Christian Hammers <ch at debian.org>  Sun, 31 Jul 2005 00:30:45 +0200
+
+mysql-dfsg-5.0 (5.0.7beta-1) unstable; urgency=low
+
+  * Second try for new upstream release. 
+  * Renamed mysql-common-5.0 to mysql-common as future libmysqlclient16
+    from e.g. MySQL-5.1 would else introduce mysql-common-5.1 which makes
+    a simultanous installation of libmysqlclient14 impossible as that
+    depends on either mysql-common or mysql-common-5.0 but not on future
+    versions. Thus we decided to always let the newest MySQL version
+    provide mysql-common.
+  * Added ${misc:Depends} as suggested by debhelper manpage. 
+  * Raised standard in control file to 3.6.2.
+  * Removed DH_COMPAT from rules in faviour of debian/compat.
+  * Checkes for presence of init script before executing it in preinst.
+    Referres: 315959
+  * Added 60_includes_mysys.h__gcc40.dpatch for GCC-4.0 compatibility.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 29 Jun 2005 00:39:05 +0200
+
+mysql-dfsg-5.0 (5.0.5beta-1) unstable; urgency=low
+
+  * New major release! Still beta so be carefull...
+  * Added federated storage engine.
+
+ -- Christian Hammers <ch at debian.org>  Wed,  8 Jun 2005 19:29:45 +0200
+
+mysql-dfsg-4.1 (4.1.12-1) unstable; urgency=low
+
+  * Christian Hammers:
+    - New upstream release.
+    - Disabled BerkeleyDB finally. It has been obsoleted by InnoDB.
+  * Sean Finney:
+    - Updated French translation from Christian Perrier (Closes: #310526).
+    - Updated Japanese translation from Hideki Yamane (Closes: #310263).
+    - Updated Russian translation from Yuriy Talakan (Closes: #310197).
+
+ -- Christian Hammers <ch at debian.org>  Sat,  4 Jun 2005 05:49:11 +0200
+
+mysql-dfsg-4.1 (4.1.11a-4) unstable; urgency=high
+
+  * Fixed FTBFS problem which was caused due to the fact that last uploads
+    BerkeleyDB patch was tried to applied on all architectures and not only
+    on those where BerkeleyDB is actually beeing built. Closes: #310296
+
+ -- Christian Hammers <ch at debian.org>  Mon, 23 May 2005 00:54:51 +0200
+
+mysql-dfsg-4.1 (4.1.11a-3) unstable; urgency=high
+
+  * Added patch from Piotr Roszatycki to compile the bundled db3 library
+    that is needed for the BerkeleyDB support with versioned symbols so
+    that mysqld no longer crashes when it gets linked together with the
+    Debian db3 version which happens when e.g. using libnss-db.
+    Closes: #308966
+
+ -- Christian Hammers <ch at debian.org>  Thu, 19 May 2005 01:41:14 +0200
+
+mysql-dfsg-4.1 (4.1.11a-2) unstable; urgency=high
+
+  * Okay, the hackery with /var/lib/dpkg/info/mysql-server.list will not
+    stand and is removed from the preinst of mysql-server.
+  * New workaround for the symlink problem that does not involve mucking
+    with dpkg's file lists is storing the symlinks in a temporary location
+    across upgrades.
+    As this sometimes fails since apt-get does not always call new.preinst
+    before old.postrm, some remarks were added to README.Debian and the
+    Debconf installation notes to minimize the inconvinience this causes.
+
+ -- sean finney <seanius at debian.org>  Sun, 15 May 2005 10:25:31 -0400
+
+mysql-dfsg-4.1 (4.1.11a-1) unstable; urgency=high
+
+  * Added the "a" to the version number to be able to upload a new
+    .orig.tar.gz file which now has the non-free Docs/ directory removed
+    as this has been forgotten in the 4.1.11 release (thanks to Goeran
+    Weinholt). Closes: #308691
+  * The Woody package listed /var/lib/mysql and /var/log/mysql in its
+    /var/lib/dpkg/info/mysql-server.list. These directories are often
+    replaced by symlinks to data partitions which triggers a dpkg bug
+    that causes these symlinks to be removed on upgrades. The new preinst
+    prevents this by removing the two lines from the .list file
+    (thanks to Andreas Barth and Jamin W. Collins). See dpkg bug #287978.
+  * Updated French Debconf translation (thanks to Christian Perrier).
+    Closes: #308353
+
+ -- Christian Hammers <ch at debian.org>  Thu, 12 May 2005 21:52:46 +0200
+
+mysql-dfsg-4.1 (4.1.11-3) unstable; urgency=high
+
+  * The "do you want to remove /var/lib/mysql when purging the package" flag
+    from old versions is removed once this package is beeing installed so
+    that purging an old Woody mysql-server package while having a
+    mysql-server-4.1 package installed can no longer lead to the removal of
+    all databases. Additionaly clarified the wording of this versions Debconf
+    template and added a check that skips this purge in the postrm script
+    if another mysql-server* package has /usr/sbin/mysqld installed.
+    (thanks to Adrian Bunk for spotting that problem) Closes: #307473
+  * Cronfile was not beeing installed as the filename was not in the
+    correct format for "dh_installcron --name" (thanks to Tomislav
+    Gountchev). Closes: #302712
+
+ -- Christian Hammers <ch at debian.org>  Sat, 23 Apr 2005 22:55:15 +0200
+
+mysql-dfsg-4.1 (4.1.11-2) unstable; urgency=low
+
+  * Sean Finney:
+    - don't freak out if we can't remove /etc/mysql during purge.
+    - debian/rules clean works again.
+  * Christian Hammers:
+    - Fixed typo in README.Debian (thanks to Joerg Rieger). Closes: #304897
+    - Completely removed the passwordless test user as it was not only
+      insecure but also lead to irritations as MySQL checks first the
+      permissions of this user and then those of a password having one.
+      See bug report from Hilko Bengen for details. Closes: #301741
+
+ -- Christian Hammers <ch at debian.org>  Sat, 16 Apr 2005 15:55:00 +0200
+
+mysql-dfsg-4.1 (4.1.11-1) unstable; urgency=low
+
+  * New upstream version. 
+  * Upstream fix for charset/collation problem. Closes: #282256
+  * Upstream fix for subselect crash. Closes: #297687
+  * Corrected minor issue in Debconf template regarding skip-networking
+    (thanks to Isaac Clerencia). Closes: #303417
+  * Made dependency to gawk unnecessary (thanks to Zoran Dzelajlija).
+    Closes: #302284
+  * Removed obsolete 50_innodb_mixlen.dpatch.
+  * Removed obsolete 51_CAN-2004-0957_db_grant_underscore.dpatch.
+
+ -- Christian Hammers <ch at debian.org>  Fri,  8 Apr 2005 00:23:53 +0200
+
+mysql-dfsg-4.1 (4.1.10a-7) unstable; urgency=low
+
+  * Sean Finney:
+    - fix for the mysteriously disappeared cronjob.  thanks to
+      Peter Palfrader <weasel at debian.org> for pointing out this omission.
+      (closes: #302712).
+
+ -- sean finney <seanius at debian.org>  Sat, 02 Apr 2005 16:54:13 -0500
+
+mysql-dfsg-4.1 (4.1.10a-6) unstable; urgency=high
+
+  * Sean Finney:
+    - the previous upload did not completely address the issue.  this one
+      should do so.  d'oh.
+
+ -- sean finney <seanius at debian.org>  Thu, 31 Mar 2005 03:35:50 +0000
+
+mysql-dfsg-4.1 (4.1.10a-5) unstable; urgency=high
+
+  * Sean Finney:
+    - the following security issue is addressed in this upload:
+      CAN-2004-0957 (grant privilege escalation on tables with underscores)
+      thanks to sergei at mysql for all his help with this.
+
+ -- sean finney <seanius at debian.org>  Wed, 30 Mar 2005 21:19:26 -0500
+
+mysql-dfsg-4.1 (4.1.10a-4) unstable; urgency=low
+
+  * Sean Finney:
+    - FTBFS fix for amd64/gcc-4.0.  Thanks to Andreas Jochens <aj at andaco.de>
+      for reporting this (closes: #301807).
+    - ANSI-compatible quoting fix in daily cron job.  thanks to 
+      Karl Hammar <karl at aspodata.se> for pointing out the problem in
+      the 4.0 branch.
+    - Added myself as a co-maintainer in the control file (closes: #295312).
+
+ -- sean finney <seanius at debian.org>  Tue, 29 Mar 2005 18:54:42 -0500
+
+mysql-dfsg-4.1 (4.1.10a-3) unstable; urgency=low
+
+  * BerkeleyDB is now disabled by default as its use is discouraged by MySQL.
+  * Added embedded server libraries as they finally do compile.
+    They are currently in libmysqlclient-dev as they are still 
+    experimental and only available as .a library (thanks to Keith Packard).
+    Closes: #297062
+  * Fixed obsolete "tail" syntax (thanks to Sven Mueller). Closes: #301413
+  * Added CAN numbers for the latest security bugfix upload.
+  * Updated manpage of mysqlmanager (thanks to Justin Pryzby). Closes: #299844
+  * Added comments to default configuration.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 20 Mar 2005 17:40:18 +0100
+
+mysql-dfsg-4.1 (4.1.10a-2) unstable; urgency=low
+
+  * Disabled "--with-mysqld-ldflags=-all-static" as it causes sig11 crashes
+    if LDAP is used for groups in /etc/nsswitch.conf. Confirmed by Sean Finney
+    and Daniel Dehennin. Closes: #299382
+
+ -- Christian Hammers <ch at debian.org>  Mon, 14 Mar 2005 03:01:03 +0100
+
+mysql-dfsg-4.1 (4.1.10a-1) unstable; urgency=high
+
+  * SECURITY:
+    - The following security related updates are addressed: 
+      CAN-2005-0711 (temporary file creation with "CREATE TEMPORARY TABLE")
+      CAN-2005-0709 (arbitrary library injection in udf_init())
+      CAN-2005-0710 (arbitrary code execution via "CREATE FUNCTION")
+      Closes: #299029, #299031, #299065
+  * New Upstream Release.
+    - Fixes some server crash conditions.
+    - Upstream includes fix for TMPDIR overriding my.cnf tmpdir setting
+      Closes: #294347
+    - Fixes InnoDB error message. Closes: #298875
+    - Fixes resouce limiting. Closes: #285044
+  * Improved checking whether or not the server is alive in the init script
+    which should make it possible to run several mysqld instances in
+    different chroot environments. Closes: #297772
+  * Fixed cron script name as dots are not allowed (thanks to Michel
+    v/d Ven). Closes: #298447
+  * Added -O3 and --with-mysqld-ldflags=-all-static as MySQL recommends to
+    build the server binary statically in order to gain about 13% more
+    performance (thanks to Marcin Kowalski).
+  * Added patch to let mysqld_safe react to signals (thanks to Erich 
+    Schubert). Closes: #208364
+  * (Thanks to Sean Finney for doing a great share of work for this release!)
+
+ -- Christian Hammers <ch at debian.org>  Thu,  3 Mar 2005 02:36:39 +0100
+
+mysql-dfsg-4.1 (4.1.10-4) unstable; urgency=medium
+
+  * Fixed bug that prevented MySQL from starting after upgrades.
+    Closes: #297198, #296403
+  * Added comment about logging to syslog to the default my.cnf
+    and the logrotate script (thanks to Ryszard Lach). Closes: #295507
+
+ -- Christian Hammers <ch at debian.org>  Thu,  3 Mar 2005 00:28:02 +0100
+
+mysql-dfsg-4.1 (4.1.10-3) unstable; urgency=low
+
+  * Sean Finney: Cronjobs now exit silently when the server package
+    has been removed but not purged (thanks to Vineet Kumar).
+    Closes: #297404
+  * Fixed comments of /etc/mysql/debian-log-rotate.conf (thanks to
+    Philip Ross). Closes: #297467
+  * Made mysqld_safe reacting sane on signals (thanks to Erich Schubert).
+    Closes: #208364
+ 
+ -- Christian Hammers <ch at debian.org>  Tue,  1 Mar 2005 19:44:34 +0100
+
+mysql-dfsg-4.1 (4.1.10-2) unstable; urgency=low
+
+  * Converted to dpatch.
+  * debian/ is now maintained via Subversion on svn.debian.org. 
+
+ -- Christian Hammers <ch at debian.org>  Tue,  1 Mar 2005 02:16:36 +0100
+
+mysql-dfsg-4.1 (4.1.10-1) unstable; urgency=low
+
+  * New upstream version.
+  * Upstream fixed memleak bug. Closes: #205587
+  * Added debian/copyright.more for personal reference.
+  * Lowered default query cache size as suggested by Arjen from MySQL.
+  * Switched from log to log-bin as suggested by Arjen from MySQL.
+  * Fixed typo in my.cnf (thanks to Sebastian Feltel). Closes: #295247
+  * Replaced --defaults-extra-file by --defaults-file in Debian scripts
+    as former lets password/host etc be overwriteable by /root/.my.cnf.
+    Added socket to /etc/mysql/debian.cnf to let it work. (thanks to
+    SATOH Fumiyasu). Closes: #295170
+
+ -- Christian Hammers <ch at debian.org>  Tue, 15 Feb 2005 23:47:02 +0100
+
+mysql-dfsg-4.1 (4.1.9-4) unstable; urgency=low
+
+  * Improved the way mysqld is started and registered with update-rc.d
+    in cases where the admin modifies the runlevel configuration.
+    Most notably removed the debconf question whether or not mysql should
+    start on when booting. Closes: #274264
+  * Renamed configuration option old-passwords to the more preferred
+    naming convention old_passwords. Same for some others (thanks to
+    Patrice Pawlak). Closes: #293983
+
+ -- Christian Hammers <ch at debian.org>  Tue,  8 Feb 2005 02:21:18 +0100
+
+mysql-dfsg-4.1 (4.1.9-3) unstable; urgency=low
+
+  * Renamed ca_ES.po to ca.po to reach a broader audience (thanks to 
+    Christian Perrier). Closes: #293786 
+  * Expicitly disabled mysqlfs support as it has never been enabled by
+    configure during the autodetection but fails due to broken upstream
+    code when users try to build the package theirselves while having
+    liborbit-dev installed which triggers the mysqlfs autodetection
+    (thanks to Max Kellermann). Closes: #293431
+  * Added dependencies to gawk as one script does not work with original-awk
+    (thanks to Petr Ferschmann). Closes: #291634
+
+ -- Christian Hammers <ch at debian.org>  Sun,  6 Feb 2005 23:33:11 +0100
+
+mysql-dfsg-4.1 (4.1.9-2) unstable; urgency=high
+
+  * SECURITY:
+    For historical reasons /usr/share/mysql/ was owned and writable by
+    the user "mysql". This is a security problem as some scripts that
+    are run by root are in this directory and could be modified and used
+    by a malicious user who already has mysql privileges to gain full root
+    rights (thanks to Matt Brubeck). Closes: #293345
+  * Changed "skip-networking" to "bind-address 127.0.0.1" which is more
+    compatible and not less secure but maybe even more, as less people enable
+    networking for all interfaces (thanks to Arjen Lentz).
+  * Enabled InnoDB by default as recommended by Arjen Lentz from MySQL.
+  * Added remarks about hosts.allow to README.Debian (thanks to David
+    Chappell). Closes: #291300
+  * mysql-server-4.1 now provides mysql-server (thanks to Paul van den Berg).
+    Closes: #287735
+
+ -- Christian Hammers <ch at debian.org>  Wed,  2 Feb 2005 23:31:55 +0100
+
+mysql-dfsg-4.1 (4.1.9-1) unstable; urgency=low
+
+  * New upstream version.
+  * mysql-client-4.1 now provides "mysql-client" so that packages depending
+    on mysql-client (ca. 40) can now be used with MySQL-4.1, too.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 23 Jan 2005 22:52:48 +0100
+
+mysql-dfsg-4.1 (4.1.8a-6) unstable; urgency=high
+
+  * SECURITY:
+    Javier Fernandez-Sanguino Pena from the Debian Security Audit Project
+    discovered a temporary file vulnerability in the mysqlaccess script of
+    MySQL that could allow an unprivileged user to let root overwrite
+    arbitrary files via a symlink attack and could also could unveil the
+    contents of a temporary file which might contain sensitive information.
+    (CAN-2005-0004, http://lists.mysql.com/internals/20600) Closes: #291122
+
+ -- Christian Hammers <ch at debian.org>  Tue, 18 Jan 2005 23:11:48 +0100
+
+mysql-dfsg-4.1 (4.1.8a-5) unstable; urgency=medium
+
+  * Fixed important upstream bug that causes from_unixtime(0) to return
+    NULL instead of "1970-01-01 00:00:00" which fails on NOT NULL columns.
+    Closes: #287792
+  * Fixes upstream bug in mysql_list_fields() . Closes: #282486
+  * Fixes bug that lead to double rotated logfiles when mysql-server 4.0
+    was previously installed (thanks to Olaf van der Spek). Closes: #289851
+  * Fixed typo in README.Debian (thanks to Mark Nipper). Closes: #289131
+  * Changed max_allowed_packet in my.cnf to 16M as in 4.0.x (thanks to
+    Olaf van der Spek). Closes: #289840
+  * Updated French debconf translation (thanks to Christian Perrier).
+    Closes: #287955
+
+ -- Christian Hammers <ch at debian.org>  Thu, 13 Jan 2005 01:29:05 +0100
+
+mysql-dfsg-4.1 (4.1.8a-4) unstable; urgency=low
+
+  * Broken patch again :-(
+
+ -- Christian Hammers <ch at debian.org>  Sun,  9 Jan 2005 23:47:55 +0100
+
+mysql-dfsg-4.1 (4.1.8a-3) unstable; urgency=low
+
+  * The mutex patch was a bit too x86 centric. This broke the alpha build.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  9 Jan 2005 14:18:49 +0100
+
+mysql-dfsg-4.1 (4.1.8a-2) unstable; urgency=medium
+ 
+  * Some Makefiles that were patched by me got overwritten by the GNU
+    autotools, probably because I also patched ./configure. Fixed now,
+    the critical mutex patch is now back in again. Closes: #286961
+  * Added patch to make MySQL compile on ARM (thanks to Adam Majer).
+    Closes: #285071
+
+ -- Christian Hammers <ch at debian.org>  Thu,  6 Jan 2005 09:30:13 +0100
+
+mysql-dfsg-4.1 (4.1.8a-1) unstable; urgency=medium
+
+  * Upstream 4.1.8 had some problems in their GNU Autotools files so they
+    released 4.1.8a. Debian's 4.1.8 was fixed by running autoreconf but this
+    again overwrote MySQL changes to ltmain.sh which are supposed to fix some
+    problems on uncommon architectures (maybe the FTBFS on alpha, arm, m68k
+    and sparc?).
+  * libmysqlclient_r.so.14 from 4.1.8-3 also missed a link dependency to
+    libz which lead to unresolved symbols visible with "ldd -r" (thanks
+    to Laurent Bonnaud). Closes: #287573
+
+ -- Christian Hammers <ch at debian.org>  Wed, 29 Dec 2004 14:26:33 +0100
+
+mysql-dfsg-4.1 (4.1.8-3) unstable; urgency=low
+
+  * Fixed checking for error messages by forcing english language
+    output by adding LC_ALL=C to debian-start (thanks to Rene
+    Konasz) Closes: #285709
+  * Fixed bashisms in Debian scripts. Closes: #286863
+  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
+    Closes: #287003
+  * Improved 4.0 to 4.1 upgrade if /var/lib/mysql is a symlink
+    (thanks to Thomas Lamy). Closes: #286560
+  * Added patch for FTBFS problem where no LinuxThreads can be found.
+    I don't know if this still applies but it should not hurt.
+    The patch is debian/patches/configure__AMD64-LinuxThreads-vs-NPTL.diff
+
+ -- Christian Hammers <ch at debian.org>  Sun, 26 Dec 2004 14:04:20 +0100
+
+mysql-dfsg-4.1 (4.1.8-2) unstable; urgency=low
+
+  * If /var/lib/mysql is a symlink then it is kept as such.
+  * Added the old-passwords option to the default my.cnf to stay
+    compatible to clients that are still compiled to libmysqlclient10
+    and libmysqlclient12 for licence reasons. 
+  * Adjusted tetex build-deps to ease backporting (thanks to Norbert
+    Tretkowski from backports.org).
+
+ -- Christian Hammers <ch at debian.org>  Tue, 21 Dec 2004 01:00:27 +0100
+
+mysql-dfsg-4.1 (4.1.8-1) unstable; urgency=medium
+
+  * New upstream version. Closes: #286175
+  * Added conflict to libmysqlclient-dev (thanks to Adam Majer).
+    Closes: #286538
+  * Added debconf-updatepo to debian/rules:clean.
+  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
+    Closes: #285107
+  * Updated French Debconf translation (thanks to Christian Perrier).
+    Closes: #285977
+  * Renamed cz.po to cs.po (thanks to Miroslav Kure). Closes: #285438
+  * Aplied patch for changed server notice to debian-start (thanks to
+    Adam Majer). Closes: #286035
+  * Changed nice value in default my.cnf as nohup changed its behaviour
+    (thanks to Dariush Pietrzak). Closes: #285446
+  * Increased verbosity of preinst script in cases where it cannot stop
+    a running server (thanks to Jan Minar). Closes: #285982
+  * Splitted the code parts of /etc/mysql/debian-start to
+    /usr/share/mysql/debian-start.inc.sh (thanks to Jan Minar).
+    Closes: #285988
+
+ -- Christian Hammers <ch at debian.org>  Mon, 20 Dec 2004 00:33:21 +0100
+
+mysql-dfsg-4.1 (4.1.7-4) unstable; urgency=medium
+
+  * Removed OpenSSL support.
+    After a short discussion with MySQL, I decided to drop OpenSSL support as
+    1. MySQL started shipping their binaries without it, too and do not
+       seem to support it in favour of using a different library somewhen.
+    2. MySQL did not adjust their licence to grant permission to link
+       against OpenSSL.
+    3. Even if they did, third parties who use libmysqlclient.so often
+       do not realise licencing problems or even do not want OpenSSL.
+    (thanks to Jordi Mallach and the responders to MySQL bug #6924)
+    Closes: #283786
+  * debian/control: Improved depends and conflicts to mysql-4.0.
+
+ -- Christian Hammers <ch at debian.org>  Thu,  2 Dec 2004 22:02:28 +0100
+
+mysql-dfsg-4.1 (4.1.7-3) unstable; urgency=low
+
+  * Raised version to make it higher as the one in experimental. 
+
+ -- Christian Hammers <ch at debian.org>  Wed,  1 Dec 2004 21:09:20 +0100
+
+mysql-dfsg-4.1 (4.1.7-2) unstable; urgency=low
+
+  * Patched scripts/mysql_install_db so that it no longer creates a
+    passwordless test database during installation (thanks to Patrick
+    Schnorbus). Closes: #281158
+  * Added Czech debconf translation (thanks to Miroslav Kure).
+    Closes: #283222
+
+ -- Christian Hammers <ch at debian.org>  Wed,  1 Dec 2004 01:29:31 +0100
+
+mysql-dfsg-4.1 (4.1.7-1) unstable; urgency=low
+
+  * New upstream branch! 
+  * Adjusted debian/control to make this package suitable to get parallel
+    to version 4.0.x into unstable and sarge. The package names are
+    different so that "mysql-server" still defaults to the rock-stable
+    4.0 instead to this announced-to-be-stable 4.1.
+  * Added --with-mutex=i86/gcc-assemler to the Berkeley-DB configure
+    to prevent the use of NPLT threads when compiling under kernel 2.6
+    because the binaries are else not runable on kernel 2.4 hosts.
+    Closes: #278638, #274598 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 31 Oct 2004 20:15:03 +0100
+
+mysql-dfsg (4.1.6-1) experimental; urgency=low
+
+  * New upstream version.
+  * Fixed symlinks in libmysqlclient-dev package. Closes: #277028
+  * This time I did not update the libtool files as they were pretty
+    up to date and I want to have a shorter diff file.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 20 Oct 2004 00:07:58 +0200
+
+mysql-dfsg (4.1.5-3) experimental; urgency=low
+
+  * debian/postinst: mysql_install_db changed parameter from --IN-RPM
+    to --rpm which caused problems during installs. Closes: #276320
+
+ -- Christian Hammers <ch at debian.org>  Sat, 16 Oct 2004 20:36:46 +0200
+
+mysql-dfsg (4.1.5-2) experimental; urgency=low
+
+  * Activated support for ndb clustering (thanks to Kevin M. Rosenberg).
+    Closes: #275109
+
+ -- Christian Hammers <ch at debian.org>  Wed,  6 Oct 2004 01:58:00 +0200
+
+mysql-dfsg (4.1.5-1) experimental; urgency=low
+
+  * WARNING:
+    The upstream branch 4.1 is still considered BETA.
+    The Debian packages for 4.1 were done without big testing. If you miss
+    a new functionality or binary, contact me and I check add the relevant
+    configure option or include the program.
+  * New MAJOR upstream version.
+    Thanks to the great demand here's now the first MySQL 4.1 experimental
+    release. FEEDBACK IS WELCOME.
+  * 4.0->4.1 notes:
+    - debian/patches/alpha.diff could not be applied, I fix that later
+    - debian/patches/scripts__mysql_install_db.sh.diff was obsolete
+    - debian/patches/scripts__Makefile.in was neccessary due to a dependency
+      to the removed non-free Docs/ directory. Upstream has been contacted.
+    - Build-Deps: += automake1.7
+    - debian/rules: embedded servers examples did not compile, removed
+
+ -- Christian Hammers <ch at debian.org>  Sun, 26 Sep 2004 19:46:47 +0200
+
+mysql-dfsg (4.0.21-3) unstable; urgency=low
+
+  * Upstream tried to fix a security bug in mysqlhotcopy and broke it :-)
+    Applied a patch (see debian/patches) from Martin Pitt. Closes: #271632
+  * Between 4.0.20 and 4.0.21 the Debian specific changes in
+    /usr/bin/mysqld_safe that piped the error log to syslog got lost
+    and are now back again. 
+  * Fixed capitalization in debconf headings.
+  * Changed wording of the initscript status message to make heartbeat
+    happier. Closes: #271591
+
+ -- Christian Hammers <ch at debian.org>  Fri, 17 Sep 2004 18:42:25 +0200
+
+mysql-dfsg (4.0.21-2) unstable; urgency=medium
+
+  * The dependencies between mysql-client and libmysqlclient12 were
+    too loose, when upgrading only the client this can lead to non working
+    binaries due to relocation errors (thanks to Dominic Cleal).
+    Closes: #271803
+  * Fixed typo in mysqldump.1 manpage (thanks to Nicolas Francois).
+    Closes: #271334
+
+ -- Christian Hammers <ch at debian.org>  Wed, 15 Sep 2004 15:38:11 +0200
+
+mysql-dfsg (4.0.21-1) unstable; urgency=high
+
+  * SECURITY:
+    This upstream version fixes some security problems that might at least
+    allow a DoS attack on the server.
+    * Fixed an old bug in concurrent accesses to `MERGE' tables (even
+      one `MERGE' table and `MyISAM' tables), that could've resulted in
+      a crash or hang of the server. (Bug #2408)
+    * Fixed bug in privilege checking where, under some conditions, one
+      was able to grant privileges on the database, he has no privileges
+      on. (Bug #3933)
+    * Fixed crash in `MATCH ... AGAINST()' on a phrase search operator
+      with a missing closing double quote. (Bug #3870)
+    * Fixed potential memory overrun in `mysql_real_connect()' (which
+      required a compromised DNS server and certain operating systems).
+      (Bug #4017)
+  * New upstream version.
+    * Fixes bug that made x="foo" in WHERE sometimes the same as x="foo ".
+      Closes: #211618
+  * Updated Japanese Debconf translation (thanks to Hideki Yamane).
+    Closes: #271097
+
+ -- Christian Hammers <ch at debian.org>  Sat, 11 Sep 2004 23:15:44 +0200
+
+mysql-dfsg (4.0.20-14) unstable; urgency=low
+
+  * Dave Rolsky spottet that -DBIG_JOINS was not properly enabled.
+    It allowes joining 64 instead of an 32 tables to join.
+
+ -- Christian Hammers <ch at debian.org>  Thu,  9 Sep 2004 20:24:02 +0200
+
+mysql-dfsg (4.0.20-13) unstable; urgency=medium
+
+  * Fixed a bug in the initscript which caused the check for not properly
+    closed i.e. corrupt tables that is executed when the server starts
+    not to run in background as supposed.
+    Although the check does not repair anything on servers with several
+    thousand tables the script was reported to take some minutes which
+    is quite annoying. (Thanks to Jakob Goldbach). Closes: #270800
+
+ -- Christian Hammers <ch at debian.org>  Thu,  9 Sep 2004 17:11:05 +0200
+
+mysql-dfsg (4.0.20-12) unstable; urgency=medium
+
+  * Filter messages regarding table handles that do not support CHECK TABLE
+    in the script that checks for corrupted tables on every start which lead
+    to unnecessary mails (thanks to David Everly). Closes: #269811 
+  * Added a note to the corrupt-table-check mail which notes that a
+    false-positive is reported in the case that immediately after starting
+    the server a client starts using a table (thanks to Uwe Kappe).
+    Closes: #269985
+  * Added "quote-names" as default to the [mysqldump] section in
+    /etc/mysql/my.cnf as too many users stumble over dump files that
+    could not be read in again due to the valid use of reserved words
+    as table names. This has also be done by upstream in 4.1.1 and has
+    no known drawbacks. Closes: #269865
+  * Binary logs can now be rotated as well. Defaults to off, though, for
+    compatibilty reasons (thanks to Mark Ferlatte). Closes: #94230, #269110
+  * The mysql user "debian-sys-maint" now gets all possible rights which
+    makes binary logging possible and helps other package maintainer who
+    wants to use it to create package specific databases and users.
+  * Added example how to change daemon nice level via /etc/mysql/my.cnf
+  * Updated French debconf translations (thanks to Christian Perrier).
+    Closes: #265811
+  * Renamed options in the default config file that still had old names
+    (thanks to Yves Kreis). Closes: #266445
+  * Fixed spelling in debconf note.
+  * Added -l and -L to dh_shlibdeps.
+
+ -- Christian Hammers <ch at debian.org>  Fri,  3 Sep 2004 20:10:46 +0200
+
+mysql-dfsg (4.0.20-11) unstable; urgency=high
+
+  * SECURITY
+    This version fixes a security flaw in mysqlhotcopy which created
+    temporary files in /tmp which had predictable filenames and such
+    could be used for a tempfile run attack.
+    The issue has been recorded as CAN-2004-0457.
+
+ -- Christian Hammers <ch at debian.org>  Sat, 14 Aug 2004 18:27:19 +0200
+
+mysql-dfsg (4.0.20-10) unstable; urgency=low
+
+  * MySQL finally updated their copyright page and installed v1.5 of
+    the "Free/Libre and Open Source Software License (FLOSS) - Exception"
+    which will hopefully end the license hell they created by putting the
+    client libraries under GPL instead of LGPL which conflicts with PHP and
+    other software that used to link against MySQL.
+    The license text is not yet in any release MySQL version but visible
+    on their web site and copied into the debian/copyright file.
+    Special thanks to Zak Greant <zak at mysql.com> and the debian-legal list
+    for helping to solve this release critical problem.
+    Closes: #242449
+  * Updated Brazil debconf translation (thanks to Andre Luis Lopes).
+    Closes: #264233
+  * Updated Japanese debconf translation (thanks to Hideki Yamane).
+    Closes: #264620
+  * Fixed minor typo in debconf description (thanks to TROJETTE Mohammed
+    Adnene). Closes: #264840
+  * Improved init and preinst script which now detects stalled servers which
+    do no longer communicate but are present in the process list (thanks to
+    Henrik Johansson). Closes: #263215
+
+ -- Christian Hammers <ch at debian.org>  Mon,  9 Aug 2004 19:44:28 +0200
+
+mysql-dfsg (4.0.20-9) unstable; urgency=medium
+
+  * Partly reverted the last patch which gave the mysql-user
+    "debian-sys-maint" more rights as there are old versions of MySQL which
+    have fewer privlige columns. Now only those are set (thanks to Alan Tam).
+    Closes: #263111
+
+ -- Christian Hammers <ch at debian.org>  Tue,  3 Aug 2004 13:03:02 +0200
+
+mysql-dfsg (4.0.20-8) unstable; urgency=low
+
+  * The mysqlcheck that is started from the initscript will now be
+    backgrounded because it might else prevent the boot process to continue.
+    It also now notifies root by mail and syslog if a table is corrupt.
+  * The "debian-sys-maint" MySQL user now has almost full rights so that other
+    packages might use this account to create databases and user (thanks to
+    Andreas Barth). Closes: #262541
+  * Added paranoid rules for logcheck.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  1 Aug 2004 21:00:55 +0200
+
+mysql-dfsg (4.0.20-8) unstable; urgency=low
+
+  * Upload stalled. Not released.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  1 Aug 2004 20:27:55 +0200
+
+mysql-dfsg (4.0.20-7) unstable; urgency=medium
+
+  * Solved the upstream bug that error messages of the server are written
+    in a file that is then rotated away leaving mysqld logging effectively
+    to /dev/null. It now logs to a /usr/bin/logger process which puts the
+    messages into the syslog.
+    Modified files: /etc/init.d/mysql, /usr/bin/mysqld_safe and the 
+    logchecker files. Closes: #254070
+  * The initscript does no longer call mysqlcheck directly but via
+    /etc/mysql/debian-start which is a user customizable config script.
+  * Splitted the debconf "install and update notes" and only show them
+    when it is appropriate (thanks to Steve Langasek). Closes: #240515
+  * Added NEWS.Debian.
+  * Added hint to -DBIG_ROWS, which is currently not used, to README.Debian.
+  * Corrected typo in myisampack manpage (thanks to Marc Lehmann). 
+    Closes: #207090
+  * Added Catalan debconf translation (thanks to Aleix Badia i Bosch).
+    Closes: #236651
+
+ -- Christian Hammers <ch at debian.org>  Wed, 28 Jul 2004 01:41:51 +0200
+
+mysql-dfsg (4.0.20-6) unstable; urgency=low
+
+  * The build arch detected by configure was "pc-linux-gnu (i686)"
+    instead of "pc-linux-gnu (i386)". Was no problem AFAIK but
+    Adam Majer asked me to explicitly change it to i386. Closes: #261382
+  * Removed some unused shell scripts from /usr/share/mysql.
+  * Added lintian overrides.
+  * Removed rpath by using chrpath.
+
+ -- Christian Hammers <ch at debian.org>  Mon, 26 Jul 2004 00:17:12 +0200
+
+mysql-dfsg (4.0.20-5) unstable; urgency=medium
+
+  * The mysqlcheck in the init script is only called when the server
+    is really alive. Also, the mysql-user 'debian-sys-maint' now has
+    global select rights (thanks to Nathan Poznick). Closes: #261130 
+  * Moved the debconf question whether to remove the databases or not
+    from mysql-server.config to mysql-server.postrm so that it shows
+    up on purge time and not months earlier (thanks to Wouter Verhelst).
+    Closes: #251838
+
+ -- Christian Hammers <ch at debian.org>  Fri, 23 Jul 2004 22:41:13 +0200
+
+mysql-dfsg (4.0.20-4) unstable; urgency=low
+
+  * Added a "mysqlcheck -A --fast" to the 'start' section of the
+    init script to help admins detect corrupt tables after a server crash.
+    Currently it exists with an error message but leaves the server
+    running. Feedback appreciated!
+  * Made postinst script more robust by calling db_stop earlier and
+    so prevent pipe-deadlocks.
+  * Fixed minor typos in initscript (thanks to "C.Y.M."). Closes: 259518
+  * Added the undocumented "-DBIG_JOINS" that MySQL apparently uses in
+    their MAX binaries. It enables 62 instead of 30 tables in a "join".
+    (thanks to Dave Rolsky). Closes: #260843
+  * Added a "df --portability /var/lib/mysql/." check to the preinst
+    script as users experienced hard to kill hanging mysqlds in such
+    a situation (thanks to Vaidas Pilkauskas). Closes: #260306
+
+ -- Christian Hammers <ch at debian.org>  Fri, 23 Jul 2004 00:51:32 +0200
+
+mysql-dfsg (4.0.20-3) unstable; urgency=low
+
+  * Improved tolerance if the init script has been deleted (thanks to
+    Leonid Shulov for spotting the problem).
+  * Minor wording changes to README.Debian generalizing /root/ by $HOME
+    (thanks to Santiago Vila). Closes: #257725
+  * Added Japanese debconf translation (thanks to Hideki Yamane).
+    Closes: #256485
+  * Fixed commend in my.cnf regarding logfile directory (thanks to Jayen
+    Ashar). Closes: #253434
+  * Correted "ease to" by "ease of" in package description (thanks to
+    Johannes Berg). Closes: #253510 
+
+ -- Christian Hammers <ch at debian.org>  Fri,  9 Jul 2004 00:57:42 +0200
+
+mysql-dfsg (4.0.20-2) unstable; urgency=low
+
+  * Removed RPM .spec file from the included documentation as it is pretty
+    useless (thanks to Loic Minier).
+  * Added turkish debconf translation (thanks to Recai Oktas). Closes: #252802
+
+ -- Christian Hammers <ch at debian.org>  Sun,  6 Jun 2004 14:48:26 +0200
+
+mysql-dfsg (4.0.20-1) unstable; urgency=low
+
+  * New upstream version. 
+
+ -- Christian Hammers <ch at debian.org>  Mon, 31 May 2004 23:36:39 +0200
+
+mysql-dfsg (4.0.18-8) unstable; urgency=low
+
+  * Updated french translation (thanks to Christian Perrier). Closes: #246789
+
+ -- Christian Hammers <ch at debian.org>  Tue,  4 May 2004 23:26:54 +0200
+
+mysql-dfsg (4.0.18-7) unstable; urgency=low
+
+  * Added CVE ids for the recent security fixes.
+    4.0.18-4 is CAN-2004-0381 (mysqlbug) and
+    4.0.18-6 is CAN-2004-0388 (mysql_multi)
+
+ -- Christian Hammers <ch at debian.org>  Mon, 19 Apr 2004 18:32:03 +0200
+
+mysql-dfsg (4.0.18-6) unstable; urgency=medium
+
+  * SECURITY:
+    Fixed minor tempfile-run security problem in mysqld_multi.
+    Unprivileged users could create symlinks to files which were then
+    unknowingly overwritten by run when this script gets executed.
+    Upstream informed. Thanks to Martin Schulze for finding this.
+
+ -- Christian Hammers <ch at debian.org>  Wed,  7 Apr 2004 01:28:22 +0200
+
+mysql-dfsg (4.0.18-5) unstable; urgency=low
+
+  * Little improvements in debian scripts for last upload. 
+  * Added check to logrotate script for the case that a mysql
+    server is running but not be accessible with the username and
+    password from /etc/mysql/debian.conf (thanks to Jeffrey W. Baker).
+    Closes: 239421
+
+ -- Christian Hammers <ch at debian.org>  Sun,  4 Apr 2004 15:27:40 +0200
+
+mysql-dfsg (4.0.18-4) unstable; urgency=medium
+
+  * SECURITY: 
+    Aplied fix for unprobable tempfile-symlink security problem in 
+    mysqlbug reported by Shaun Colley on bugtraq on 2004-03-24.
+  * Updated french debconf translation (thanks to Christian Perrier).
+    Closes: #236878 
+  * Updated portugesian debconf translation (thanks to Nuno Senica).
+    Closes: #239168
+  * Updated german debconf translation (thanks to Alwin Meschede).
+    Closes: #241749
+  * Improved debconf template regarding fix_privileges_tables (thanks 
+    to Matt Zimmermann for suggestions). Closes: #219400
+  * Improved README.Debian regarding to password settings (thanks to
+    Yann Dirson). Closes: #241328
+
+ -- Christian Hammers <ch at debian.org>  Sat,  3 Apr 2004 19:52:15 +0200
+
+mysql-dfsg (4.0.18-3) unstable; urgency=medium
+
+  * Added Build-Depend to po-debconf to let it build everywhere.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 31 Mar 2004 23:43:33 +0200
+
+mysql-dfsg (4.0.18-2) unstable; urgency=low
+
+  * Added a "2>/dev/null" to a "which" command as there are two
+    "which" versions in Debian of which one needs it. Closes: #235363
+
+ -- Christian Hammers <ch at debian.org>  Tue,  2 Mar 2004 23:31:28 +0100
+
+mysql-dfsg (4.0.18-1) unstable; urgency=low
+
+  * New upstream version.
+  * Should now compile and run on ia64 (thanks to Thorsten Werner and
+    David Mosberger-Tang). Closes: #226863 #228834 
+  * Converted init scripts to invoce-rc.d (thanks to Erich Schubert).
+    Closes: 232118 
+  * Secondlast upload changed logfile location. Closes: #182655
+  * Updated Brasilian translation (thanks to Andre Luis Lopes). Closes:
+    #219847
+
+ -- Christian Hammers <ch at debian.org>  Tue, 17 Feb 2004 23:44:58 +0100
+
+mysql-dfsg (4.0.17-2) unstable; urgency=low
+
+  * Improved manpage for mysqldumpslow.1 (thanks to Anthony DeRobertis).
+    Closes: #231039
+  * Improved stopping of crashed daemons in init script (thanks to
+    Matthias Urlichs). Closes: #230327
+
+ -- Christian Hammers <ch at debian.org>  Mon,  9 Feb 2004 21:54:29 +0100
+
+mysql-dfsg (4.0.17-1) unstable; urgency=low
+
+  * Made logging into /var/log/mysql/ the default. Closes: #225206
+ 
+  * New upstream version. Closes: #225028
+  * Turned on a 25MB query cache by default (thanks to Cyril Bouthors).
+    Closes: #226789
+  * Updated russian translation (thanks to Ilgiz Kalmetev). Closes: #219263
+  * Upstream fixes the problem that AND was not commutative (thanks for
+    Iain D Broadfoot for mentioning). Closes: #227927
+  * Fixed minor typo in my.cnf comments (thanks to James Renken). 
+    Closes: #221496
+  * Better documents regex. Closes: #214952
+  * Fixed minor germanism in debconf template (thanks to Marc Haber).
+    Closes: #224148
+  * Added explaining comment to my.cnf regarding quoted passwords 
+    (Thanks to Patrick von der Hagen). Closes: #224906
+  * Changed "find -exec" to "find -print0 | xargs -0" in preinst to
+    speed it up. Thanks to Cyril Bouthors. Closes: #220229
+
+ -- Christian Hammers <ch at debian.org>  Sun, 18 Jan 2004 16:16:25 +0100
+
+mysql-dfsg (4.0.16-2) unstable; urgency=low
+
+  * Tried to repair undefined weak symbols by adding a little Makefile
+    patch. Closes: #215973
+
+ -- Christian Hammers <ch at debian.org>  Mon, 27 Oct 2003 22:52:10 +0100
+
+mysql-dfsg (4.0.16-1) unstable; urgency=low
+
+  * New upstream release.
+    (Mostly little memory problems and other bugfixes it seems)
+  * Replaced "." by ":" in chown calls to comply with the env setting
+  	"_POSIX2_VERSION=2000112" (thanks to Robert Luberda). Closes: #217399
+  * Adjusted syntax in my.cnf to 4.x standard (thanks to Guillaume Plessis).
+    Closes: #217273
+  * Improved README.Debian password instructions (thanks to Levi Waldron).
+    Closes: #215046
+  * Improved NIS warning debconf-template (thanks to Jeff Breidenbach).
+    Closes: #215791
+  * Explicitly added libssl-dev to the libmysqlclient-dev package as it
+    is needed for mysql_config and the libmysqlclient package only depends
+    on libssl which has no unnumbered .so version (thanks to Simon Peter
+    and Davor Ocelic). Closes: #214436, #216162
+  * Added "-lwrap" to "mysql_config --libmysqld-libs" and filed it as
+    upstream bug #1650 (thanks to Noah Levitt). Closes: #214636
+
+ -- Christian Hammers <ch at debian.org>  Sat, 25 Oct 2003 01:09:27 +0200
+
+mysql-dfsg (4.0.15a-1) unstable; urgency=low
+
+  * Same package as 4.0.15-2 but I could not convince the Debian
+    installer to move the packages out of incoming.
+
+ -- Christian Hammers <ch at debian.org>  Tue,  7 Oct 2003 15:10:26 +0200
+
+mysql-dfsg (4.0.15-2) unstable; urgency=low
+
+  * Updated package description (thanks to Adrian Bunk). Closes: #210988 
+  * Fixed small typos in manpages (thanks to Nicolas Francois).
+    Closes: #211983
+  * More updates to package description (thanks to Matthias Lutz/ddtp).
+    Closes: #213456
+  * Updated standards to 3.6.1.
+  * Closes "new 4.0.15 available" bug. Closes: #213349
+  * Updated README.Debian with notes regarding the MySQL manual section
+    "2.4 Post-installation Setup and Testing" (thanks to Daniel B.).
+    Closes: #210841
+
+ -- Christian Hammers <ch at debian.org>  Fri,  3 Oct 2003 15:59:39 +0200
+
+mysql-dfsg (4.0.15-1) unstable; urgency=high
+
+  * SECURITY:
+    Users who are able to use the "ALTER TABLE" command on the "mysql"
+    database may be able to exploit this vulnerability to gain a shell with
+    the privileges of the mysql server (usually running as the 'mysql' user).
+    Closes: #210403
+  * Fixes small description typos (thanks to Oscar Jarkvik).
+  * Updated Brazilian Portuguese debconf translation. (thanks to Andre Luis
+    Lopes). Closes: 208030
+  * Replaced depricated '.' by ':' in chown (thanks to Matt Zimmerman).
+  * Fixed manpage typo (thanks to Marc Lehmann). Closes: #207090
+
+ -- Christian Hammers <ch at debian.org>  Fri,  3 Oct 2003 15:59:35 +0200
+
+mysql-dfsg (4.0.14-1) unstable; urgency=low
+
+  * New upstream version. 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 24 Aug 2003 16:40:36 +0200
+
+mysql-dfsg (4.0.13-3) unstable; urgency=low
+
+  * Now start mysqld as default unless you choose not when configurig
+    with debconf priority low. So packages depending on the server when
+    installing can access it. Thanks Matt Zimmermann (Closes: #200277)
+  * Made mysql-server de-installable if the config and database files were
+    removed by hand before. Thanks to Ard van Breemen (Closes: #200304)
+
+ -- Christian Hammers <ch at debian.org>  Tue,  8 Jul 2003 22:30:40 +0200
+
+mysql-dfsg (4.0.13-2) unstable; urgency=low
+
+  * Added "nice" option for mysqld_safe to give mysqld a different priority.
+    Submitted to upstream as MySQL Bug #627. Closes: #192087
+  * Fixed possible unbound variable in init script. Closes: #194621
+  * Fixed french debconf translation (thx Christian Perrier) Closes: #194739
+  * Get rid of automake1.5 (for Eric Dorland). 
+
+ -- Christian Hammers <ch at debian.org>  Wed, 11 Jun 2003 18:58:32 +0200
+
+mysql-dfsg (4.0.13-1) unstable; urgency=medium
+
+  * New upstream version.
+    !!! Fixes a very bad natural join bug which justifies the urgency=medium.
+    !!! http://bugs.mysql.com/bug.php?id=291
+  * Fixed mysql_fix_privileges manpage (Frederic Briere) Closes: #191776
+  * preinst: "which" is more chatty normal executable than as builtin.
+    (Thanks to David B Harris). Closes: #188659
+
+ -- Christian Hammers <ch at debian.org>  Tue,  6 May 2003 22:03:45 +0200
+
+mysql-dfsg (4.0.12-3) unstable; urgency=medium
+
+  * Reincluded new way of creating my debian-sys-maint user from
+    an old release from experimental. Now works again with old
+    and new privilege table format. (Thanks to Vincent Danjean
+    for spotting the problem) Closes: #188201
+  * Reincluded hurd build dependency fix from 3.23 branch.
+    (Thanks to Robert Millan). Closes: #185929
+  * Fixed soname in libmysqlclient-dev.  Closes: #188160
+  * Remove /var/log/mysql/ when purging the package. Closes: #188064
+  * Removed /usr/share/doc/mysql/ from mysql-server. Closes: #188066
+  * Let group "adm" be able to read logfiles. Closes: #188067
+  * Do not call usermod on every upgrade. Closes: #188248
+    (Thanks to Philippe Troin for the last three)
+  * Fixed mysql-server.preinst so that it works on shells where 
+    which is a builtin, too. (Thanks to Erich Schubert) Closes: #181525
+
+ -- Christian Hammers <ch at debian.org>  Fri, 11 Apr 2003 11:32:45 +0200
+
+mysql-dfsg (4.0.12-2) unstable; urgency=low
+
+  *
+  * NEW MAJOR UPSTREAM RELEASE:
+  *
+    MySQL 4 has finally been declared as 'stable'. Hurray! Read changelogs.
+    Thanks to all testers, esp. Jose Luis Tallon, of the versions
+    that were in the "experimental" section before.
+  * Modified postinst script to run mysql_fix_privileges on every update.
+    IMPORTANT: Please report if this breaks anything, it is not supposed to.
+  * Wrote a SSL-MINI-HOWTO.txt!
+  * Added zlib1g-dev to libmysqlclient12-dev. Closes: 186656
+  * Changed section of libmysqlclient12-dev to libdevel.
+  * Added even more selfwritten manpages.
+  * Fixed typos.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  6 Apr 2003 13:47:32 +0200
+
+mysql-dfsg (4.0.10.gamma-1) experimental; urgency=low
+
+  * New upstream version.
+  * They merged some of my patches from debian/patches. Whoa!
+  * This release should fix the error-logfile problem where mysqld
+    keeps the error.log open while logrotate removes it.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 12 Feb 2003 22:39:48 +0100
+
+mysql-dfsg (4.0.9.gamma-1) experimental; urgency=low
+
+  * New upstream version. 
+  * Updated the GNU autoconf files to make building on MIPS work.
+    See bug #176829.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 29 Jan 2003 22:07:44 +0100
+
+mysql-dfsg (4.0.8.gamma-1) experimental; urgency=low
+
+  * New upstream release. 
+  * Improved logging of init script. Closes: #174790
+  * We have now libmysqlclient.so.12 instead of .11.
+
+ -- Christian Hammers <ch at debian.org>  Thu,  9 Jan 2003 20:14:11 +0100
+
+mysql-dfsg (4.0.7.gamma-1) experimental; urgency=high
+
+  * SECURITY: This version fixes an upstream security release that is only
+              present in the 4.x branch which is currently only in the
+              experimental distribution and therefore will not get a DSA. 
+  * New upstream release.
+
+ -- Christian Hammers <ch at debian.org>  Sat, 28 Dec 2002 15:51:39 +0100
+
+mysql-dfsg (4.0.6.gamma-2) experimental; urgency=low
+
+  * Added --system to addgroup. Closes: #173866
+
+ -- Christian Hammers <ch at debian.org>  Sat, 21 Dec 2002 15:28:26 +0100
+
+mysql-dfsg (4.0.6.gamma-1) experimental; urgency=low
+
+  * New upstream version. Now Gamma!
+  * There are no longer changes to the .orig.tar.gz neccessary to make diff
+    happy. docs/ has still to be deleted, although, as it is non-free.
+  * Incorporated patches from unstable.
+  * Added mysqlmanager and a couple of other new scripts.
+  * Enabled libmysqld embedded server library.
+  * Enabled SSL and Virtual-IO support.
+    (CORBA based MySQL-FS seems to be not existing..)
+
+ -- Christian Hammers <ch at debian.org>  Fri, 20 Dec 2002 22:30:51 +0100
+
+mysql-dfsg (4.0.5a.beta-3) experimental; urgency=low
+
+  * Modified postinst to work with old and new mysql.user table format
+    and fixed spelling typo in postinst. Thanks to Roger Aich.
+  * Updated config.{guess,sub} to make the mipsel porters happy.
+    Thanks to Ryan Murray. Closes: #173553
+
+ -- Christian Hammers <ch at debian.org>  Wed, 18 Dec 2002 15:56:34 +0100
+
+mysql-dfsg (4.0.5a.beta-2) experimental; urgency=low
+
+  * Upstream removed option "--skip-gemini". So did I. Closes: 173142
+
+ -- Christian Hammers <ch at debian.org>  Tue, 17 Dec 2002 10:35:49 +0100
+
+mysql-dfsg (4.0.5a.beta-1) experimental; urgency=low
+
+  * First 4.x experimental package due to continuous user requests :-)
+    Please test and report!
+  * upstream: safe_mysqld has been renamed to mysqld_safe
+  * upstream: new library soname version libmysqlclient.so.11
+  * Renamed libmysqlclientXX-dev to libmysqlclient-dev as I don't plan to
+    support more than one development environment and this makes the 
+    dependencies easier.
+  * FIXME: Skipped parts of the debian/patches/alpha patch as the global.h 
+    is not existing.
+  * FIXME: How to get rid this? Old ltconfig patch already applied.
+    "lintian: binary-or-shlib-defines-rpath ./usr/bin/mysql /usr/lib/mysql"
+
+ -- Christian Hammers <ch at debian.org>  Sun,  1 Dec 2002 18:32:32 +0100
+
+mysql-dfsg (3.23.53-4) unstable; urgency=medium
+
+  * Fixed errno.h problem. Closes: #168533, #168535 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 10 Nov 2002 18:32:08 +0100
+
+mysql-dfsg (3.23.53-3) unstable; urgency=medium
+
+  * Changed automake build-dep to unversioned automake1.4. Closes: #166391
+  * Fixed description. Closes: #167270
+    (Thanks to Soren Boll Overgaard)
+
+ -- Christian Hammers <ch at debian.org>  Tue,  5 Nov 2002 01:25:01 +0100
+ 
+mysql-dfsg (3.23.53-2) unstable; urgency=low
+
+  * Reverted user creation in init scripts. Closes: #166432
+    (Thanks to Birzan George Cristian) 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 31 Oct 2002 15:36:25 +0100
+
+mysql-dfsg (3.23.53-1) unstable; urgency=low
+
+  * New upstream release. 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 24 Oct 2002 23:04:16 +0200
+
+mysql-dfsg (3.23.52-3) unstable; urgency=low
+
+  * Substituted the first-install 'debian-sys-maint' user creation by
+    something ANSI SQL compliant. Closes: #163497
+    (Thanks to Karl Hammar)
+  * Tightend dependency to debhelper (>= 4.0.12) to be sure that
+    debconf-utils gets installed, too, as I use dh_installdebconf.
+  * Fixed upstream manpage bug in mysqldump.1. Closes: #159779
+    (Thanks to Colin Watson) 
+  * Added comment about MIN_WORD_LEN to mysql-server.README.Debian
+    (Thanks to Philipp Dreimann)
+  * Added a dependency for zlib1g-dev to libmysqlclient10-dev.
+    (Thanks to Jordi Mallach)
+
+ -- Christian Hammers <ch at debian.org>  Sun, 15 Sep 2002 17:14:44 +0200
+
+mysql-dfsg (3.23.52-2) unstable; urgency=low
+
+  * Fixed typo in preinst scripts.
+  * Removed bashism in init script.
+  * Fixed ambiguous debconf example. Closes: #158884
+
+ -- Christian Hammers <ch at debian.org>  Fri, 30 Aug 2002 00:51:29 +0200
+
+mysql-dfsg (3.23.52-1) unstable; urgency=low
+
+  * New upstream version. Closes: #157731
+  * Clearified the meaning of the debian-sys-maint special user in the
+    README.Debian file. Closes: #153702
+  * Wrote some words regarding the skip-networking in README.Debian.
+    Closes: #157038
+  * Added dependency to passwd. 
+  * Fixes typo and unnecessarily complication in is_mysql_alive().
+  * Added check for /etc/mysql/my.cnf in init script.
+
+ -- Christian Hammers <ch at debian.org>  Tue, 27 Aug 2002 01:53:32 +0200
+
+mysql-dfsg (3.23.51-4) unstable; urgency=low
+
+  * Added a compressed "nm mysqld" output to allow people to trace
+    core dumps with /usr/bin/resolve_stack_dump as suggested in the
+    INSTALL-SOURCE file. Thanks to atudor at labs.agilent.com for the hint.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 24 Jul 2002 20:44:55 +0200
+
+mysql-dfsg (3.23.51-3) unstable; urgency=low
+
+  * Corrected copyright file: the MySQL client library is licenced under
+    the LGPL-2 not the GPL. From version 4.x it actually will be GPL this
+    is why parts of http://www.mysql.com/ already say so. Closes: #153591
+  * Corrected german translation.
+    Thanks to Roland Rosenfeld <roland at spinnaker.de>. Closes: #151903 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 11 Jul 2002 20:32:28 +0200
+
+mysql-dfsg (3.23.51-2) unstable; urgency=low
+
+  * Improved NIS tolerance in preinst script. 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  7 Jul 2002 04:43:28 +0200
+
+mysql-dfsg (3.23.51-1) unstable; urgency=medium
+
+  * New upstream version.
+  * I applied a patch that fixes a binary imcompatibility in
+    the shared libary libmysqlclient.so.10 between 3.23.50 and
+    some versions earlier. Upstream has been contacted and asked
+    for clarification. Closes: #149952
+  * Added support for NIS i.e. it shows a warning and fails if the
+    needed 'mysql' user does not exists but works if it does.
+    Closes: #143282, #147869
+  * Substituted $0 in init scripts by something really weird so that
+    "./S20mysql restart" works now, too. (BTW: S20? install file-rc!!!)
+    Closes: #148658
+  * Now postinst works even if /etc/init.d/mysql is removed. Closes: #151021
+  * Decided to leave "set +x" in postinst but wrote comment. Closes: #151022
+
+ -- Christian Hammers <ch at debian.org>  Sun,  7 Jul 2002 04:43:25 +0200
+
+mysql-dfsg (3.23.50-1) unstable; urgency=medium
+
+  * New upstream version.
+    Fixes a very annoying and important bug that lets all mysql programs
+    including perl scripts etc. segfault when using the read_default_group()
+    function. 3.23.50 is currently a pre-release and expected to be released
+    next week. I plan to propose it for woody as soon as its stability has
+    been proven. The following bug reports are all regarding this issue.
+    Closes: #144960, #145322, #136798, #138143,
+
+ -- Christian Hammers <ch at debian.org>  Sat, 18 May 2002 21:14:01 +0200
+
+mysql-dfsg (3.23.49x-1) unstable; urgency=low
+
+  * I had to split the package to seperate the manual as it is not GPL
+    like the rest of the software and docs but under a license that
+    e.g. forbids selling printed versions. 
+    .
+    The upstream authors were contacted a while ago but did not like to
+    change the situation.
+    .
+    The names of the resulting packages have not changed as the manual
+    already was in a seperate mysql-doc package due to it's size. 
+    The source packages are now splitted from one "mysql" to 
+    "mysql-dfsg" in main and "mysql-nonfree" in non-free.
+  * No code change! 
+    The "x" at the end of the version number ist just to be able to 
+    upload a new source package. ("a" was already taken by upstream 
+    for their binary upload correction)  
+
+ -- Christian Hammers <ch at debian.org>  Wed,  8 May 2002 02:01:41 +0200
+
+mysql (3.23.49-8) unstable; urgency=low
+
+  * Substituted $0 in init script to let e.g. "/etc# ./init.d/mysql restart"
+    works, too. Closes: #141555
+
+ -- Christian Hammers <ch at debian.org>  Sun,  7 Apr 2002 15:00:44 +0200
+
+mysql (3.23.49-7) unstable; urgency=low
+
+  * The Makefiles are totally broken for the --enable-local-infile
+    option. I now patched libmysql/libmysql.c#mysql_init() manually.
+    Closes: #138347 
+
+ -- Christian Hammers <ch at debian.org>  Fri, 29 Mar 2002 23:55:15 +0100
+
+mysql (3.23.49-6) unstable; urgency=low
+
+  * Moved mysqlcheck from server to client package. Closes: #139799
+  * Added manpage for mysqlhotcopy. Regarding: #87097 
+  * Added 'sharedscripts' directive to the logrotate script.
+  * Replaced grep by /usr/bin/getent to let the group/user checking work
+    on NIS/LDAP systems, too. Closes: #115677, #101529
+
+ -- Christian Hammers <ch at debian.org>  Fri, 22 Mar 2002 22:40:51 +0100
+
+mysql (3.23.49-5) unstable; urgency=low
+
+  * Added skip-innodb to default my.cnf.
+  * Enabled --enable-local-infile, it seems to be a new option that
+    defaults to disable a formerly enabled feaure. Closes: #137115
+
+ -- Christian Hammers <ch at debian.org>  Sat, 16 Mar 2002 00:29:10 +0100
+
+mysql (3.23.49-4) unstable; urgency=medium
+
+  * Recompiled against fixed libz.
+
+  * Enabled --enable-local-infile, it seems to be a new option that
+    defaults to disable a formerly enabled feaure. Closes: #137115
+  * Fixed README.compile_on_potato. Closes: #136529 
+  * Now a ext3 .jounal file in /var/lib/mysql does not prevent the
+    installation (happens when creating a jounal on an already mounted
+    partition). Closes: #137146
+
+ -- Christian Hammers <ch at debian.org>  Wed, 13 Mar 2002 13:34:24 +0100
+
+mysql (3.23.49-3) unstable; urgency=low
+
+  * Added Russian translation. Closes: #135846
+  * Fixed installation of .info documents. Closes: #135030
+
+ -- Christian Hammers <ch at debian.org>  Wed, 27 Feb 2002 23:36:35 +0100
+
+mysql (3.23.49-2) unstable; urgency=low
+
+  * Updated french translation and split template files. Closes: #134754 
+  * Fixed a small debian.cnf related bug in mysql-server.postinst.
+
+ -- Christian Hammers <ch at debian.org>  Tue, 19 Feb 2002 23:13:58 +0100
+
+mysql (3.23.49-1) unstable; urgency=low
+
+  * New upstream release.
+    (Mainly InnoDB related fixes)
+  * Exported a $HOME variable in the scripts so that /root/.my.cnf
+    is not read anymore. This will avoid problems when admins put 
+    only passwords but no usernames in this file. Closes: #132048
+  * New debian-sys-maint password algorithm (now ~96bit :-)) Closes: #133863
+  * Recreating debian-sys-main pwd on every install to help people who
+    accidently delete user or password files...
+  * Added /var/log/mysql so that user can put the binary logs in there as
+    mysql cannot write the .001 etc files itself in /var/log which is 
+    owned by root.
+
+ -- Christian Hammers <ch at debian.org>  Thu, 14 Feb 2002 22:17:45 +0100
+
+mysql (3.23.47-6) unstable; urgency=low
+
+  * Dropped a sentence about the new debian-sys-maint user in the
+    debconf note and updated the README.Debian.  Related: #132048
+  * Added more french translation. Closes: #132390 
+
+ -- Christian Hammers <ch at debian.org>  Wed,  6 Feb 2002 09:41:29 +0100
+
+mysql (3.23.47-5) unstable; urgency=low
+
+  * Fixed grammar error in template. Closes: #132238 
+  * Really fixed typo in logrotate script. Closes: #131711
+
+ -- Christian Hammers <ch at debian.org>  Tue,  5 Feb 2002 14:20:08 +0100
+
+mysql (3.23.47-4) unstable; urgency=medium
+
+  * Fixes typo in postinst that let init script fail. Closes: #131743
+  * Fixed bashism bug that failed on ash. Closes: #131697
+  * Fixed typo in logrotate script. Closes: #131711
+
+ -- Christian Hammers <ch at debian.org>  Thu, 31 Jan 2002 23:58:46 +0100
+
+mysql (3.23.47-3) unstable; urgency=low
+
+  * Added new Debian specific mysql user called 'debian-sys-maint' which
+    is used for pinging the server status, flushing the logs or shutting
+    down the server in maintenance scripts. The credentials of this user
+    are stored in the UID0-only readable file /etc/mysql/debian.cnf.
+    Closes: #129887, #130326, #99274
+  * Fixed unintended server startup at boottime. Closes: #122676, #130105
+  * New upstream fixes command line parsing bug: Closes: #128473
+  * Fixed manpage headers to let apropos work: Closes: #119122
+  * Added "status" options for /etc/init.d/mysql. Closes: #129020
+
+ -- Christian Hammers <ch at debian.org>  Sun, 27 Jan 2002 19:46:11 +0100
+
+mysql (3.23.47-2) unstable; urgency=low
+
+  * Enhanced init scripts by using mysqladmin instead of kill $pid.
+    Thanks to Aaron Brick. 
+
+ -- Christian Hammers <ch at debian.org>  Fri, 18 Jan 2002 01:42:23 +0100
+
+mysql (3.23.47-1) unstable; urgency=low
+
+  * New upstream release.
+  * Updated brazilian translation of debconf descriptions. Closes: #123332
+
+ -- Christian Hammers <ch at debian.org>  Sun,  6 Jan 2002 21:11:17 +0100
+
+mysql (3.23.46-3) unstable; urgency=low
+
+  * Fixed bug in postinst where a script was accidently called with
+    "bash -c <script> -IN_RPM" prevting the first argument to take effect
+    and then leading to failures on hosts with unresolvable hostnames.
+    Closes: #126147
+  * Small changes and comments in postinst. 
+
+ -- Christian Hammers <ch at debian.org>  Sat, 22 Dec 2001 14:03:02 +0100
+
+mysql (3.23.46-2) unstable; urgency=low
+
+  * Start/stop behaviour now configurable via debconf. Closes: #112174 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  9 Dec 2001 21:38:54 +0100
+
+mysql (3.23.46-1) unstable; urgency=low
+
+  * New upstream release. 
+    Only few fixes, mainly innodb related. 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  2 Dec 2001 03:08:48 +0100
+
+mysql (3.23.45-1) unstable; urgency=low
+
+  * New upstream version. 
+    Only few fixes, mainly innodb related. 
+  * Added debconf note regarding the skip-networking option.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 25 Nov 2001 16:50:37 +0100
+
+mysql (3.23.44-2) unstable; urgency=low
+
+  * Finally removed debconf toggled "skip-networking" line add/remove 
+    code for /etc/mysql/my.cnf. I don't like editing a file that's tagged
+    as configuration file.
+    I disabled networking by default for security reasons. Better ideas?
+
+ -- Christian Hammers <ch at debian.org>  Fri, 16 Nov 2001 02:11:02 +0100
+
+mysql (3.23.44-1) unstable; urgency=low
+
+  * New upstream release.
+    - fixes replication bug (core dump)
+  * Made description better english :) Thanks to D. Welton. 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 11 Nov 2001 15:44:07 +0100
+
+mysql (3.23.43-4) unstable; urgency=low
+
+  * Disabled statically linking. 
+
+ -- Christian Hammers <ch at debian.org>  Sat, 10 Nov 2001 03:15:56 +0100
+
+mysql (3.23.43-3) unstable; urgency=low
+
+  * Changed compiler settings after one user reported instabilities.
+    See #116631 for more information. 
+
+ -- Christian Hammers <ch at debian.org>  Tue, 30 Oct 2001 21:39:17 +0100
+
+mysql (3.23.43-2) unstable; urgency=low
+
+  * Patched sparc mutexes again. Closes: #113430 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  7 Oct 2001 15:09:00 +0200
+
+mysql (3.23.43-1) unstable; urgency=low
+
+  * New upstream version.
+    - Fixed some unlikely(sic!) bugs and core dumps.
+    - Fixed a bug with BDB tables and UNIQUE columns that are NULL.
+    - [more minor bugs were fixed; see changelog]
+  * Adjusted build depends on libwrap0 for IA-64. Closes: #114582
+  * Added the mysqlcheck binary. Closes: #114490
+  * Fixed rules for arm architecture. Closes: #88186
+  * Renamed mysql_print_defaults to the original name my_print_defaults.
+    Isn't as descriptive but else I'd have to patch too much. Closes: #114492
+
+ -- Christian Hammers <ch at debian.org>  Fri,  5 Oct 2001 22:24:40 +0200
+
+mysql (3.23.42-2) unstable; urgency=low
+
+  * Applied patch for m68k compile. Closes: #112904 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 23 Sep 2001 21:32:57 +0200
+
+mysql (3.23.42-1) unstable; urgency=low
+
+  * New upstream releae.
+    Fixes critical bug with InnoDB and large BLOBs. 
+
+ -- Christian Hammers <ch at debian.org>  Tue, 18 Sep 2001 22:25:47 +0200
+
+mysql (3.23.41-2) unstable; urgency=low
+
+  * Fixed shlibs.local problem. Closes: #111573 
+  * Replaced emacs by sensible-editor in mysqlbug.sh. Thanks Hans Ginzel.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  9 Sep 2001 17:16:42 +0200
+
+mysql (3.23.41-1) unstable; urgency=low
+
+  * New upstream release
+  * Fixed build problem on ia64. Closes: #110624
+
+ -- Christian Hammers <ch at debian.org>  Tue, 14 Aug 2001 23:20:35 +0200
+
+mysql (3.23.40-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Christian Hammers <ch at debian.org>  Sun,  5 Aug 2001 19:46:18 +0200
+
+mysql (3.23.39-5) unstable; urgency=low
+
+  * Added debconf template for brazil. Closes: #106934, #106752 
+  * Tightened dependencies on debconf.
+  * Adjusted mysql.err permissions in logrotate script to 0600. Closes: #105672
+
+ -- Christian Hammers <ch at debian.org>  Mon, 30 Jul 2001 00:10:12 +0200
+
+mysql (3.23.39-4.1) unstable; urgency=low
+
+  * Maintainer-requested NMU.
+  * Fixing thread mutexes on Sparc and Alpha
+    (closes: Bug#101783)
+  * Added --enable-assembler for sparc.  This should
+    allow mysql on sparc to use assembler versions of
+    some string functions (read: should speed up a bit).
+
+ -- Christopher C. Chimelis <chris at debian.org>  Fri, 13 Jul 2001 15:09:30 -0400
+  
+mysql (3.23.39-4) unstable; urgency=low
+
+  * Porting fixes.
+
+ -- Christian Hammers <ch at debian.org>  Mon,  9 Jul 2001 17:56:54 +0200
+
+mysql (3.23.39-3.1) unstable; urgency=low
+
+  * NMU (for porting)
+  * Update config.sub and config.guess for hppa, sh & s390.
+  * Add --with-client-ldflags=-lstdc++ to configure line.  Closes: #100884
+
+ -- Matthew Wilcox <willy at debian.org>  Sun,  8 Jul 2001 19:26:59 -0600
+
+mysql (3.23.39-3) unstable; urgency=low
+
+  * Disabled berkeley-db on sparc again. Mutexes aren't working again :-( 
+
+ -- Christian Hammers <ch at debian.org>  Sat,  7 Jul 2001 18:30:08 +0200
+
+mysql (3.23.39-2) unstable; urgency=low
+
+  * Bugfixed the m68k mutex patch. Thanks to Michael Fedrowitz. Closes: #103145 
+  * Removed config.cache files in bdb/ and innobase/. Closes: #103143
+
+ -- Christian Hammers <ch at debian.org>  Wed,  4 Jul 2001 22:06:58 +0200
+
+mysql (3.23.39-1) unstable; urgency=low
+
+  * New upstream release. Minor bugfixes only. 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 14 Jun 2001 13:53:03 +0200
+
+mysql (3.23.38-4) unstable; urgency=low
+
+  * Added logcheck files. Closes: #99131
+    (I can't let the usermod away since I don't know of an easy way to
+    retrive "passwd" information in a shell script considering that 
+    people use different storage methods like LDAP/NIS instead of passwd.)
+
+ -- Christian Hammers <ch at debian.org>  Fri,  8 Jun 2001 21:04:25 +0200
+
+mysql (3.23.38-3) unstable; urgency=low
+
+  * Explicit pointet to /root/.my.cnf to let /etc/init.d/mysql stop
+    work in sudo environments with $HOME!=/root work, too. Closes: #98324
+  * Removes empty /etc/mysql on purge. Closes: #98164
+
+ -- Christian Hammers <ch at debian.org>  Tue, 22 May 2001 10:13:06 +0200
+
+mysql (3.23.38-2) unstable; urgency=low
+
+  * Added depends to libdbd-mysql-perl for mysql-server. Closes: #94306
+
+ -- Christian Hammers <ch at debian.org>  Sat, 19 May 2001 19:43:26 +0200
+
+mysql (3.23.38-1) unstable; urgency=low
+
+  * New upstream release. 
+  * Added Build-Depends to procps. Closes: #96768
+
+ -- Christian Hammers <ch at debian.org>  Sun, 13 May 2001 17:30:15 +0200
+
+mysql (3.23.37-5) unstable; urgency=low
+
+  * Applied mutex patch for bdb support on m68k. 
+    Thanks to Michael Fedrowitz for the patch.
+
+ -- Christian Hammers <ch at debian.org>  Mon,  7 May 2001 12:30:40 +0200
+
+mysql (3.23.37-4) unstable; urgency=low
+
+  * Enable bdb support for m68k architecture.
+
+ -- Christian Hammers <ch at debian.org>  Sat,  5 May 2001 16:47:36 +0200
+
+mysql (3.23.37-3) unstable; urgency=low
+
+  * Added thread-safe client library. Thanks to Shane Wegner. Closes: #95441 
+
+ -- Christian Hammers <ch at debian.org>  Sat, 28 Apr 2001 09:45:00 -0400
+
+mysql (3.23.37-2) unstable; urgency=low
+
+  * Added sparc to the list of BDB supporting architectures after some
+    tests on vore.debian.org and mails with Ben Collons.
+
+ -- Christian Hammers <ch at debian.org>  Fri, 27 Apr 2001 09:30:09 -0400
+
+mysql (3.23.37-1) unstable; urgency=low
+
+  * New upstream version. 
+  * Added gemini table support.
+  * Does anybody know how to enable SSL?
+  * Fixed ARM compilation problem. Closes: #88186
+
+ -- Christian Hammers <ch at debian.org>  Sat, 21 Apr 2001 11:48:46 -0400
+
+mysql (3.23.36-2) unstable; urgency=low
+
+  * Added patch by Christopher C. Chimelis <chris at debian.org> to make
+    Berkeley db3 work again on Alpha architecture. Closes: #92787
+
+ -- Christian Hammers <ch at debian.org>  Tue,  3 Apr 2001 23:41:46 +0200
+
+mysql (3.23.36-1) unstable; urgency=high
+
+  * New upstream version.
+  * SECURITY FIX: One could place database tables outside the database
+    directory by using '..' in one of the mysql helper programs where the
+    table name was not checked correctly. This could lead to root compromise
+    if the server would be running as root else you could at least do bad
+    things as user mysql.
+  * upstream: Fixed bug when thread creation failed.
+  * upstream: Fixed problem in Innobase with non-latin1 charsets
+  * upstream: Fixed a core-dump bug when using very complex query with DISTINGT
+  * upstream: many others so called minor bugs...
+  * fixes bug in init script. Closes: #90257 
+    (this report was agains some older problem that has been fixed too in .33)
+
+ -- Christian Hammers <ch at debian.org>  Fri, 30 Mar 2001 02:55:12 +0200
+
+mysql (3.23.35-1) unstable; urgency=medium
+
+  * New upstream relase.
+  * Fixes problem in ORDER BY clause. People using 3.33.34 should upgrade!
+  * Includes innobase support.
+    (Hope this is not such a catastrophe like berkeley db...)
+
+ -- Christian Hammers <ch at debian.org>  Fri, 16 Mar 2001 23:30:30 +0100
+
+mysql (3.23.33-3) unstable; urgency=low
+
+  * Forgot #!/bin/sh at top of mysql-doc.postinst. Closes: #89801 
+
+ -- Christian Hammers <ch at vore.debian.org>  Thu, 15 Mar 2001 20:38:35 -0500
+
+mysql (3.23.33-2) unstable; urgency=low
+
+  * Added some missing scripts and manpages. Closes: #84068
+  * Added dependency to perl-5.6. Closes: #81942 
+  * Added french templates somewhen ago. Closes: #83790
+  * Added patch to get db3 working on Alpha. Closes: #86033
+    Thanks to Christopher C. Chimelis <chris at debian.org>. The patch
+    itself is included as debian/patch.alpha, too.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 18 Feb 2001 06:40:40 +0100
+
+mysql (3.23.33-1) unstable; urgency=high
+
+  * Fixes two security bugs that allowes crashing the server and maybe
+    gaining the UID of the process that is linked against libmysqlclient!
+
+ -- Christian Hammers <ch at debian.org>  Tue, 13 Feb 2001 23:01:18 +0100
+
+mysql (3.23.32-1) unstable; urgency=low
+
+  * New upstream releaes.
+    (just minor fixes)
+  * Added french and german debconf templates. 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  4 Feb 2001 17:27:07 +0100
+
+mysql (3.23.31-1) unstable; urgency=high
+
+  * New upstream release.
+  * Fixes security bug that was announced at BUGTRAQ mailing list.
+    (Disappointingly not by mysql.com!). And allows a buffer overflow
+    and therefore access to the mysql UID and all databases when already
+    having a valid account. Closes: #82881
+
+ -- Christian Hammers <ch at debian.org>  Sat, 20 Jan 2001 11:14:36 +0100
+
+mysql (3.23.30-2) unstable; urgency=low
+
+  * Recompiled with new dpkg-dev. 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 14 Jan 2001 22:20:55 +0100
+
+mysql (3.23.30-1) unstable; urgency=low
+
+  * New upstream release. 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  7 Jan 2001 22:10:18 +0100
+
+mysql (3.23.28-10) testing unstable; urgency=low
+
+  * I must upload to "testing" to get it into woody, right?! 
+
+ -- Christian Hammers <ch at debian.org>  Fri, 29 Dec 2000 14:43:57 +0100
+
+mysql (3.23.28-9) unstable; urgency=low
+
+  * Made it a replacement for libmysqlclient9. 
+
+ -- Christian Hammers <ch at westend.com>  Mon, 25 Dec 2000 19:15:04 +0100
+
+mysql (3.23.28-8) unstable; urgency=low
+
+  * Applied patch from a user to get the skip-networking option working!
+    Approved from a mysql employee but please test anyways.
+    This finally: Closes: #79672, #78634, #79660, #79658
+
+ -- Christian Hammers <ch at debian.org>  Sat, 16 Dec 2000 14:01:36 +0100
+
+mysql (3.23.28-6) unstable; urgency=medium
+
+  * Fixed error in postinst. Closes: #79392, #79400, #79451, #79550
+  * Added .info files again on user request. Closes: #78988, #75737 
+
+ -- Christian Hammers <ch at debian.org>  Wed, 13 Dec 2000 21:18:24 +0100
+
+mysql (3.23.28-5) unstable; urgency=low
+
+  * Fixed a stupid bug in mysql-server.postinst regarding the 
+    configuration of skip-networking. Closes: #78639, 78634
+  * Used patched bdb which hopefully enables mutexes on Alpha. Closes: #78197
+  * Added dependency to adduser. Closes: #76798
+
+ -- Christian Hammers <ch at debian.org>  Sun, 10 Dec 2000 16:55:48 +0100
+
+mysql (3.23.28-4) unstable; urgency=low
+
+  [never uploaded]
+  * Fixed a stupid bug in mysql-server.postinst regarding the 
+    configuration of skip-networking. Closes: #78639, 78634
+  * Used patched bdb which hopefully enables mutexes on Alpha. Closes: #78197
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Dec 2000 17:49:44 +0100
+
+mysql (3.23.28-3) unstable; urgency=low
+
+  * This time really fixed m68k build error. Closes: #78235 
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Dec 2000 15:02:55 +0100
+
+mysql (3.23.28-2) unstable; urgency=low
+
+  * Adjusted rules file to make it buildable on m86k. Closes: #78235 
+
+ -- Christian Hammers <ch at debian.org>  Fri,  1 Dec 2000 20:07:26 +0100
+
+mysql (3.23.28-1) unstable; urgency=low
+
+  * New upstream vesrion. Now gamma! 
+  * Changed umask of mysql.log making it o-rw
+  * Disabled listening on network reachable TCP ports by default due to
+    security considerations.
+
+ -- Christian Hammers <ch at debian.org>  Thu, 23 Nov 2000 20:12:50 +0100
+
+mysql (3.23.27-1) unstable; urgency=low
+
+  * New upstream version.
+  * Closes: #75711
+
+ -- Christian Hammers <ch at debian.org>  Sun, 29 Oct 2000 14:29:51 +0100
+
+mysql (3.23.25-4) unstable; urgency=low
+
+  * Recompiled to get rid of the dependency for zlib1 (libc5).
+    Closes: #74952, #74939
+
+ -- Christian Hammers <ch at debian.org>  Tue, 17 Oct 2000 14:34:52 +0200
+
+mysql (3.23.25-3.1) unstable; urgency=low
+
+  * Maintainer-approved NMU.
+  * Includes patch to fix and enable db3 support on Alpha.
+  * Enable support for thread mutexes in db3 on sparc
+    (it works after all, according to Ben Collins)
+  * Removed atomic_ functions for Alpha since they are no
+    longer supported in the current glibc in woody.
+  * Cleaned up rules file a bit.
+
+ -- Christopher C. Chimelis <chris at debian.org>  Sat, 14 Oct 2000 04:22:02 -0400
+
+mysql (3.23.25-3) unstable; urgency=low
+
+  * Upstream decided not to include my_config.h,my_dir.h into the installed
+    header files. As this file contains at least informative material
+    and more important is checked by several autoconf scripts I
+    included it by hand again.
+  * Made building of berkeley db conditional to architecture until
+    I get response whether it works on sparc/alpha now.
+
+ -- Christian Hammers <ch at debian.org>  Wed, 11 Oct 2000 23:58:38 +0200
+
+mysql (3.23.25-2) unstable; urgency=medium
+
+  * Last build went terrible wrong.. Here's the changelog again:
+  * New upstream release.
+  * Shared library version was raised from 9 to 10.
+    Maintainers of packets using libmysqlclient9 must recompile!
+
+ -- Christian Hammers <ch at debian.org>  Wed, 11 Oct 2000 01:16:34 +0200
+
+mysql (3.23.25-1) unstable; urgency=low
+
+  * New upstream release.
+  * Shared library version was raised from 9 to 10.
+    Maintainers of packets using libmysqlclient9 must recompile!
+
+ -- Christian Hammers <ch at debian.org>  Sat,  7 Oct 2000 18:21:51 +0200
+
+mysql (3.23.24-2) unstable; urgency=low
+
+  * Applied upstream patch regarding quoting of mysqldump.
+  * Updated to db-3.1.17-patched (from www.mysql.com)
+
+ -- Christian Hammers <ch at debian.org>  Fri, 15 Sep 2000 18:58:14 +0200
+
+mysql (3.23.24-1) unstable; urgency=medium
+
+  * New upstream version with some important fixes.
+  * upstream: Last version corrupted CHAR/VARCHAR/BLOB columns with 
+    chararacters above ASCII 128! Check and repair all these tables. 
+  * upstream: fixed small memory leak
+  * upstream: fixed problem with BDB tables and reading on unique
+              (not primary) key.
+  * Disabled BDB tables on all architectures except i386 due to many
+    bug reports (see #71206).  -> HELP APPRECIATED <-
+
+ -- Christian Hammers <ch at debian.org>  Tue, 12 Sep 2000 06:18:54 +0200
+
+mysql (3.23.23-2) unstable; urgency=low
+
+  * Strange... "nohup nice" gives differnet results and let therefore
+    crash safe_mysqld when starting up. Apparently it seems to be
+    kernel dependand. Now fixed by another conditional. This
+    more or less Closes: #71057
+  * This bug was reported (accidently) in the following identical reports:
+    Closes: #71253, #71254, #71257, #71258, #71259, #71262, #71266, #71267
+    Closes: #71268, #71271, #71275, #71277, #71278, #71283, #71291
+
+ -- Christian Hammers <ch at debian.org>  Sat,  9 Sep 2000 20:13:50 +0200
+
+mysql (3.23.23-1) unstable; urgency=low
+
+  * New upstream version. Feature freeze!
+  * Fixed source build problem. Closes: #70707 
+
+ -- Christian Hammers <ch at debian.org>  Thu, 31 Aug 2000 10:03:35 +0200
+
+mysql (3.23.22b-1) unstable; urgency=low
+
+  * Reorganised docs. Now we have several small html files instead of
+    one with almost 2M. Closes: 70431
+  * Removed pdf,ps and html from source package shrinked it about 3M
+    (therefore the .orig.tar.gz is called 3.23.22b!)
+  * -> Last upload failed due to problems at the FTP site so here the 
+    -> changelog again:
+  * Fixes memory leak, commit/rollback, reserved word "MASTER" ...
+  * Added Berkeley DB3 source code to the Debian diff to be able to
+    compile with bdb transaction support! (Great feature!!!)
+  * Upstream correction of error message. Closes: #68939
+  * Upstream correction of reserved word "source".
+
+ -- Christian Hammers <ch at debian.org>  Fri, 25 Aug 2000 19:21:24 +0200
+
+mysql (3.23.22-1) unstable; urgency=low
+
+  * New upstream version.
+  * Fixes memory leak, commit/rollback, reserved word "MASTER" ...
+  * Added Berkeley DB3 source code to the Debian diff to be able to
+    compile with bdb transaction support! (Great feature!!!)
+  * Upstream correction of error message. Closes: #68939
+  * Upstream correction of reserved word "source".
+
+ -- Christian Hammers <ch at debian.org>  Sun, 20 Aug 2000 09:05:48 +0200
+
+mysql (3.23.21-4) unstable; urgency=low
+
+  * Added libmysqlclient9.shlibs and shlibs.local file. Closes: #68669
+
+ -- Christian Hammers <ch at debian.org>  Wed,  9 Aug 2000 14:22:49 +0200
+
+mysql (3.23.21-3) unstable; urgency=low
+
+  * Let "/etc/init.d/mysql restart" wait until the pid has been
+    removed before (but max 6 seconds) before restarting. Closes: 65070
+  * Added build dependencies. 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 30 Jul 2000 16:16:48 +0200
+
+mysql (3.23.21-2) unstable; urgency=low
+
+  * Typo in safe_mysqld prevents start.
+
+ -- Christian Hammers <ch at debian.org>  Sat, 29 Jul 2000 13:40:50 +0200
+
+mysql (3.23.21-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Christian Hammers <ch at debian.org>  Mon, 10 Jul 2000 22:54:17 +0200
+
+mysql (3.23.20-1) unstable; urgency=low
+
+  * MySQL finally got fully GPL'ed! This means that there is only one
+    souce package and only main/* binary packages from now on.
+  * Fixed symlink in libmysqlclient9-dev. Closes: 66452
+  * Apart from that the usual bug fixes for BETA software.
+
+ -- Christian Hammers <ch at debian.org>  Mon,  3 Jul 2000 20:05:38 +0200
+
+mysql-pd (3.23.16-1) unstable; urgency=low
+
+  * New upstream release. (Actually a brand new upstream branch!)
+  * Added mysql-common package as the configuration file can be used
+    by all versions of the mysql client library.
+    Did some more package reorganisations, too. See README.Debian file!
+  * libmysqlclient.so raised major version from 6 to 9.
+  * Minor beautifications in the debian/ directory.
+
+ -- Christian Hammers <ch at debian.org>  Sat, 27 May 2000 20:30:01 +0200
+
+mysql-gpl (3.22.30-2) frozen unstable; urgency=low
+
+  * Fixed path in libmysqlclient.la. Closes: #58875 
+
+ -- Christian Hammers <ch at debian.org>  Sat, 25 Jan 2000 20:27:29 -0700
+
+mysql-gpl (3.22.30-1) frozen unstable; urgency=low
+
+  * A small change in the libmysqlclient6 causes mysqladmin to print an
+    shared library error when displaying the defaults. Everything else
+    works fine so this error wasn't detected untill now. Closes: #58033
+  * TcX released a new MySQL version that includes another security patch,
+    this time against mysqlaccess. The author told me that it would be 
+    fine if I just included the new .c in this source since I don't want
+    go to 3.22.32 in frozen.
+  * ->Release Manager: Although the version number increased there is
+    no new coded except for the shared library. The rest is the same
+    as in mysql-server and mysql-client.
+
+ -- Christian Hammers <ch at debian.org>  Tue, 15 Feb 2000 23:26:54 +0100
+
+mysql-gpl (3.22.29-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Christian Hammers <ch at debian.org>  Thu,  6 Jan 2000 20:37:23 +0100
+
+mysql-gpl (3.22.27a-3) unstable; urgency=low
+
+  * Use system readline instead of bundled version. Closes: #50069 
+    Any objections ?
+
+ -- Christian Hammers <ch at debian.org>  Sun, 14 Nov 1999 18:09:48 +0100
+
+mysql-gpl (3.22.27a-2) unstable; urgency=low
+
+  * Now building mysql-gpl-doc in binary-indep. 
+
+ -- Christian Hammers <ch at debian.org>  Sat, 23 Oct 1999 04:22:36 +0200
+
+mysql-gpl (3.22.27a-1) unstable; urgency=low
+
+  * Adjusted version number to allow new orig.tar.gz.
+    The old seems broken :-( People reported compilation problems.
+  * Changed mysql-gpl-doc to "Architecture: all". 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 17 Oct 1999 13:01:35 +0200
+
+mysql-gpl (3.22.27-1) unstable; urgency=low
+
+  * New upstream release. Fixes charset problem.
+
+ -- Christian Hammers <ch at debian.org>  Mon, 11 Oct 1999 18:01:40 +0200
+
+mysql-gpl (3.22.26a-1) unstable; urgency=low
+
+  * New upstream version. Just some small bug fixes.
+  * FHS compliance.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Oct 1999 10:16:14 +0200
+
+mysql-gpl (3.22.25-2) unstable; urgency=low
+
+  * Added conflict to all old mysql-dev packages. (fixes: #42966) 
+
+ -- Christian Hammers <ch at debian.org>  Sun, 15 Aug 1999 11:35:46 +0200
+
+mysql-gpl (3.22.25-1) unstable; urgency=low
+
+  * New upstream version. (We are waiting for 3.23.x !)
+  * Fixes some upstream small bugs.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 18 Jul 1999 22:02:06 +0200
+
+mysql-gpl (3.22.23b-4) unstable; urgency=low
+
+  * Rebuild for new perl. 
+
+ -- Christian Hammers <ch at debian.org>  Thu,  8 Jul 1999 01:09:57 +0200
+
+mysql-gpl (3.22.23b-3) unstable; urgency=low
+
+  * libmysqlclient had the wrong socket path.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 03 Jul 1999 23:13:30 +0200
+
+mysql-gpl (3.22.23b-2) unstable; urgency=low
+
+  * Missed one replace tag to an very old version of mysql-devel.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 27 Jun 1999 19:13:30 +0200
+
+mysql-gpl (3.22.23b-1) unstable; urgency=low
+
+  * New upstream minor version.
+  * Cleaned up the dependencies a bit.
+
+ -- Christian Hammers <ch at debian.org>  Sun, 27 Jun 1999 19:13:30 +0200
+
+mysql-gpl (3.22.22-1) unstable; urgency=low
+
+  * New upstream version. (closes Bug#36493,37340)
+  * New maintainer upload.
+  * Package reorganisation: We prepare for the GPL'ed server which will
+  *  be released soon and make the structure more clear to the user.
+
+ -- Christian Hammers <ch at debian.org>  Mon,  3 May 1999 20:43:41 +0200
+
+mysql (3.22.21-1) unstable; urgency=low
+
+  * Never released. TcX was too fast :-)
+
+ -- Christian Hammers <ch at debian.org>  Tue, 20 Apr 1999 17:22:04 +0200
+
+mysql-freebits (3.21.33b-3) unstable; urgency=low
+
+  * Recompile with libncurses
+
+ -- Scott Hanson <shanson at debian.org>  Sat, 31 Oct 1998 15:04:39 +0100
+
+mysql-freebits (3.21.33b-2) unstable; urgency=low
+
+  * Recompile with libstdc++2.9 (fixes #27792)
+
+ -- Scott Hanson <shanson at debian.org>  Mon, 12 Oct 1998 18:47:25 +0200
+
+mysql-freebits (3.21.33b-1) unstable; urgency=low
+
+  * New upstream version (probably the last for 3.21)
+
+ -- Scott Hanson <shanson at debian.org>  Tue,  8 Sep 1998 18:59:37 +0200
+
+mysql-freebits (3.21.33-4) unstable; urgency=low
+
+  * Separate out non-free source files, move mysql-base, mysql-dev, and
+  *  mysql-doc to main distribution
+  * Locale files /usr/share/mysql/ now in server, not base; therefore...
+  * Add conflict to mysql-server <=3.21.33-3
+
+ -- Scott Hanson <shanson at debian.org>  Fri, 31 Jul 1998 19:16:08 +0200
+
+mysql (3.21.33-3) unstable; urgency=low
+
+  * Release to unstable with moved socket (fixes #24574)
+  * Add conflict to old libdbd-mysql-perl package
+
+ -- Scott Hanson <shanson at debian.org>  Wed, 22 Jul 1998 22:17:43 +0200
+
+mysql (3.21.33-2) experimental; urgency=low
+
+  * Move socket from /tmp to /var/run (see #24574) 
+  * Release to experimental, since this breaks everything statically
+  *  linked to libmysqlclient!
+
+ -- Scott Hanson <shanson at debian.org>  Wed, 15 Jul 1998 19:37:01 +0200
+
+mysql (3.21.33-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Scott Hanson <shanson at debian.org>  Sun, 12 Jul 1998 08:18:18 +0200
+
+mysql (3.21.32a-1) unstable; urgency=low
+
+  * New upstream release 
+  * Lintian bugs: ldconfig, missing manpage, call to perl5
+  * Lintian bug shlib-with-non-pic-code _not_ yet fixed 
+
+ -- Scott Hanson <shanson at debian.org>  Sat,  4 Jul 1998 07:57:13 +0200
+
+mysql (3.21.31-1) unstable frozen; urgency=low
+
+  * New upstream release for hamm and slink (bug fixes only)
+  * Fix unsecure use of temp file in mysqlbug (fixes #23606) 
+  * Added brief licensing information to control file
+
+ -- Scott Hanson <shanson at debian.org>  Tue, 16 Jun 1998 10:52:44 +0200
+
+mysql (3.21.30-3) unstable; urgency=low
+
+  * Restore missing shared library dependencies for mysql-server
+
+ -- Scott Hanson <shanson at debian.org>  Mon, 15 Jun 1998 07:51:58 +0200
+
+mysql (3.21.30-2) unstable; urgency=low
+
+  * Simplify debian/rules (fixes #17662)
+  * Edit manual.texi to add "Debian notes" to documentation
+  * Add note about passwords on command line (fixes #16471)
+  * Add note about getting privleges for users (fixes #22891)
+  * Correct "Possible license changes" heading (fixes #22711)
+  * Add uninstalled header files to /usr/doc/mysql-dev/examples (fixes #22627)
+  * Add udf_example.cc to /usr/doc/mysql-dev/examples (fixes #22710)
+
+ -- Scott Hanson <shanson at debian.org>  Sun,  7 Jun 1998 13:05:37 +0200
+
+mysql (3.21.30-1) unstable; urgency=low
+
+  * Stable upstream release
+
+ -- Scott Hanson <shanson at debian.org>  Tue, 12 May 1998 22:13:25 +0200
+
+mysql (3.21.29gamma-1) unstable; urgency=low
+
+  * New upstream release
+  * Do not create 'mysql' subdirectory for libs and headers (fixes #19020)
+  * Remove 'CXX=gcc' flag from configure (g++ now standard)
+      
+ -- Scott Hanson <shanson at debian.org>  Sun, 12 Apr 1998 18:38:03 +0200
+
+mysql (3.21.28gamma-1) unstable; urgency=low
+
+  * New upstream release
+  * Unstable-only release; hamm stays at 3.21.25 for now
+
+ -- Scott Hanson <shanson at debian.org>  Thu,  2 Apr 1998 21:33:51 +0200
+
+mysql (3.21.25gamma-3) unstable frozen; urgency=low
+
+  * Have mysql-base suggest perl >= 5.004 for mysqlaccess (fixes #19593)
+  * Fix shlibs to refer to mysql-base rather than the no-longer-existant mysql
+
+ -- Scott Hanson <shanson at debian.org>  Thu, 26 Mar 1998 18:22:59 +0100
+
+mysql (3.21.25gamma-2) unstable; urgency=low
+
+  * Restore libmysqlclient.so symlink to mysql-dev (fixes #19036)
+
+ -- Scott Hanson <shanson at debian.org>  Sun,  8 Mar 1998 10:46:43 +0100
+
+mysql (3.21.25gamma-1) unstable; urgency=low
+
+  * Check if running as root in init.d script (fixes #18577)
+  * New upstream release
+
+ -- Scott Hanson <shanson at debian.org>  Fri, 27 Feb 1998 20:01:30 +0100
+
+mysql (3.21.24gamma-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Scott Hanson <shanson at debian.org>  Mon, 23 Feb 1998 08:14:17 +0100
+
+mysql (3.21.23beta-3) unstable; urgency=low
+
+  * Squashed errors found by lintian
+
+ -- Scott Hanson <shanson at debian.org>  Tue, 17 Feb 1998 20:19:01 +0100
+
+mysql (3.21.23beta-2) unstable; urgency=low
+
+  * Fixed overlaps with old mysql package (fixes #17843)
+
+ -- Scott Hanson <shanson at debian.org>  Thu,  5 Feb 1998 22:55:00 +0100
+
+mysql (3.21.23beta-1) unstable; urgency=low
+
+  * New upstream release
+  * Fix include lines in mysql.h (fixes #17827)
+  * Move /usr/include/mysql to mysql-dev
+
+ -- Scott Hanson <shanson at debian.org>  Wed,  4 Feb 1998 19:59:14 +0100
+
+mysql (3.21.22beta-3) unstable; urgency=low
+
+  * Correct descriptions in control file (fixes #17698)
+  * Clean up output of shutdown script
+
+ -- Scott Hanson <shanson at debian.org>  Sat, 31 Jan 1998 19:04:29 +0100
+
+mysql (3.21.22beta-2) unstable; urgency=low
+
+  * Split out mysql-dev and mysql-bench subpackages
+
+ -- Scott Hanson <shanson at debian.org>  Wed, 28 Jan 1998 19:52:27 +0100
+
+mysql (3.21.22beta-1) unstable; urgency=low
+
+  * New upstream release 
+  
+ -- Scott Hanson <shanson at debian.org>  Wed, 28 Jan 1998 18:59:09 +0100
+
+mysql (3.21.21a.beta-2) unstable; urgency=low
+
+  * Compile with libpthreads from libc6-dev_2.0.6-3 rather than statically 
+    linking to patched libpthreads (see changes to 3.20.29-2)
+  
+ -- Scott Hanson <shanson at debian.org>  Sun, 25 Jan 1998 13:17:15 +0100
+
+mysql (3.21.21a.beta-1) unstable; urgency=low
+
+  * Put initial database, mysql_install_db, safe_mysqld, isamlog and 
+    isamchk in mysql-server 	
+  * Correct upstream release number so source packages are correctly built
+
+ -- Scott Hanson <shanson at debian.org>  Mon, 19 Jan 1998 07:52:48 +0100
+
+mysql (3.21.21.beta-1) unstable; urgency=low
+
+  * Use debhelper where possible in rules
+  * Split binary packages into mysql-base, mysql-client, mysql-doc	
+  * New upstream release
+
+ -- Scott Hanson <shanson at debian.org>  Thu, 15 Jan 1998 08:12:17 +0100
+
+mysql (3.21.19.beta-1) unstable; urgency=low
+
+  * Offer to set root password in mysql_install_db
+  * Kill `pidof mysqld` on shutdown rather than use mysqladmin
+  * New upstream version
+
+ -- Scott Hanson <shanson at debian.org>  Fri,  9 Jan 1998 20:06:35 +0100
+
+mysql (3.21.17a.beta-2) unstable; urgency=low
+
+  * Remove perl stuff (it's going back into libdbd-mysql-perl)
+  * Remove conflict with libdbd-mysql-perl
+  * Do not compress *html files (fixes #16314)
+
+ -- Scott Hanson <shanson at debian.org>  Tue, 30 Dec 1997 07:34:20 +0100
+
+mysql (3.21.17a.beta-1) unstable; urgency=low
+
+  * Add conflict to libdbd-mysql-perl
+  * Use --pid-file option to place pid file in /var/run rather than patching 
+  * Add install-info to postinst and postrm
+  * Add filename to message shown by mysql_install_db (fixes #16621)
+  * New upstream version
+
+ -- Scott Hanson <shanson at debian.org>  Sun, 21 Dec 1997 19:41:45 +0100
+
+mysql (3.20.32a-5) unstable; urgency=low
+
+  * Move mysqld to /usr/lib/mysql, per policy discussion
+  * Adjust makefiles so perl libs get installed 
+
+ -- Scott Hanson <shanson at debian.org>  Wed,  3 Dec 1997 22:37:45 +0100
+
+mysql (3.20.32a-4) unstable; urgency=low
+
+  * Move mysqld to /usr/sbin to comply with FSSTND
+
+ -- Scott Hanson <shanson at debian.org>  Mon,  3 Nov 1997 20:12:29 +0100
+
+mysql (3.20.32a-3) unstable; urgency=low
+
+  * Comment out tests in mysql_install_db... for real this time!
+
+ -- Scott Hanson <shanson at debian.org>  Mon,  3 Nov 1997 07:32:53 +0100
+
+mysql (3.20.32a-2) unstable; urgency=low
+
+  * Comment out tests in mysql_install_db (fixes #14304)
+
+ -- Scott Hanson <shanson at debian.org>  Sat,  1 Nov 1997 18:45:25 +0100
+
+mysql (3.20.32a-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Scott Hanson <shanson at debian.org>  Wed, 29 Oct 1997 07:11:42 +0100
+
+mysql (3.20.29-2) unstable; urgency=low
+ 
+  * New maintainer
+  * Statically link mysqld to patched glibc-2.0.5 libpthread 
+    (works around #13586; see README.debian.glibc-2.0.5)
+  * Conflict with libpthread0 (fixes #13448)
+  * Don't link libg++, avoiding problems with glibc libpthread 
+
+ -- Scott Hanson <shanson at debian.org>  Thu, 16 Oct 1997 19:25:23 +0200
+
+mysql (3.20.29-1) unstable; urgency=low
+
+  * New upstream version
+  * Recompiled with libc6
+  * Include mysql-faq_toc.html (fixes #10885)
+  * Reworked /etc/init.d/mysql script (thanks to Heiko)
+  * Remove file /usr/lib/libmysqlclient.so.4 when package is removed.
+  * Use absolute path specification for conffile
+  * Use /usr/bin/perl instead of /bin/perl (fixes #10654)
+  * Do not depend on mysql (fixes #12427)
+  * Installed missing manpage for Mysql perl module
+  * Don't use debstd anymore
+  * Pristine source
+  * Set section to `non-free/devel'
+  * Upgraded to standards version 2.3.0.0
+
+ -- Christian Schwarz <schwarz at debian.org>  Fri, 12 Sep 1997 02:12:58 +0200
+
+mysql (3.20.16beta-2) unstable; urgency=low
+
+  * Uses /usr/bin/perl instead of /bin/perl (fixes bug #9731)
+  * Don't run mysqld with --log option
+  * Don't install regex manual pages
+  * Suggest package mysql-manual
+  * Fixed typo in changelog
+  * Upgrade to policy 2.1.3.2
+
+ -- Christian Schwarz <schwarz at debian.org>  Sun, 11 May 1997 14:19:26 +0200
+
+mysql (3.20.16beta-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Christian Schwarz <schwarz at debian.org>  Sat, 12 Apr 1997 13:51:28 +0200

Added: mysql-dfsg-5.0/branches/unstable/debian/compat
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/compat	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/compat	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+4

Added: mysql-dfsg-5.0/branches/unstable/debian/control
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/control	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/control	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,114 @@
+Source: mysql-dfsg-5.0
+Section: misc
+Priority: optional
+Maintainer: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
+Uploaders:  Christian Hammers <ch at debian.org>, Sean Finney <seanius at debian.org>, Norbert Tretkowski <nobse at debian.org>, Monty Taylor <mordred at inaugust.com>
+Build-Depends: libtool (>= 1.4.2-7), procps | hurd,  debhelper (>= 4.1.16), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline5-dev | libreadline-dev, psmisc, po-debconf, chrpath, automake1.9, dpatch, gawk, bison, lsb-release
+Standards-Version: 3.8.0
+Homepage: http://dev.mysql.com/
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-mysql/
+Vcs-Svn: svn://svn.debian.org/svn/pkg-mysql/
+
+Package: libmysqlclient15off
+Section: libs
+Architecture: any
+Depends: mysql-common (>= ${source:Version}), ${shlibs:Depends}
+Conflicts: libmysqlclient15
+Replaces: libmysqlclient15
+Description: MySQL database client library
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes the client library.
+
+Package: libmysqlclient15-dev
+Architecture: any
+Section: libdevel
+Depends: libmysqlclient15off (>= ${binary:Version}), zlib1g-dev, ${shlibs:Depends}
+Conflicts: libmysqlclient14-dev, libmysqlclient12-dev, libmysqlclient10-dev
+Provides: libmysqlclient-dev
+Description: MySQL database development files
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes development libraries and header files.
+
+Package: mysql-common
+Section: misc
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: MySQL database common files
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes files needed by all versions of the client library
+ (e.g. /etc/mysql/my.cnf).
+
+Package: mysql-client-5.0
+Architecture: any
+Depends: debianutils (>=1.6), libdbi-perl, libdbd-mysql-perl (>= 1.2202), mysql-common (>= ${source:Version}), libmysqlclient15off (>= ${binary:Version}), ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Recommends: libterm-readkey-perl
+Provides: virtual-mysql-client, mysql-client, mysql-community-client-5.0
+Conflicts: mysql-client (<< ${source:Version}), mysql-enterprise-client-5.0
+Replaces: mysql-client (<< ${source:Version}), mysql-server
+Description: MySQL database client binaries
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes the client binaries and the additional tools
+ innotop and mysqlreport.
+
+Package: mysql-server-5.0
+Architecture: any                                                               
+Suggests: tinyca
+Recommends: mailx, libhtml-template-perl
+Pre-Depends: mysql-common (>= ${source:Version}), adduser (>= 3.40), debconf
+Depends: mysql-client-5.0 (>= ${binary:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10)
+Conflicts: mysql-server (<< ${source:Version})
+Provides: mysql-server, virtual-mysql-server, mysql-community-server-5.0
+Replaces: mysql-server (<< ${source:Version}), mysql-enterprise-server-5.0
+Description: MySQL database server binaries
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+ .
+ This package includes the server and ndb-cluster binaries.
+
+Package: mysql-server
+Architecture: all
+Depends: mysql-server-5.0
+Description: MySQL database server (metapackage depending on the latest version)
+ This is an empty package that depends on the current "best" version
+ of mysql-server (currently mysql-server-5.0), as determined by the
+ MySQL maintainers. Install this package if in doubt about which MySQL
+ version you need. That will install the version recommended by the
+ package maintainers.
+ .
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.
+
+Package: mysql-client
+Architecture: all
+Depends: mysql-client-5.0
+Description: MySQL database client (metapackage depending on the latest version)
+ This is an empty package that depends on the current "best" version of
+ mysql-client (currently mysql-client-5.0), as determined by the MySQL
+ maintainers. Install this package if in doubt about which MySQL
+ version you need. That will install the version recommended by the
+ package maintainers.
+ .
+ MySQL is a fast, stable and true multi-user, multi-threaded SQL database
+ server. SQL (Structured Query Language) is the most popular database query
+ language in the world. The main goals of MySQL are speed, robustness and
+ ease of use.

Added: mysql-dfsg-5.0/branches/unstable/debian/copyright
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/copyright	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/copyright	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,169 @@
+
+== MySQL ==
+
+The Debian package of MySQL was first debianzed on 1997-04-12 by Christian
+Schwarz <schwarz at debian.org> and ist maintained since 1999-04-20 by 
+Christian Hammers <ch at debian.org>.
+
+It can be downloaded from http://www.mysql.com/
+
+Copyright:
+
+According to the file "COPYING" all parts of this package are licenced
+under the terms of the GNU GPL Version 2 of which a copy is available
+in /usr/share/common-licenses.
+
+To allow free software with other licences than the GPL to link against the 
+shared library, special terms for "derived works" are defined in the file
+"EXCEPTIONS-CLIENT" which is quoted below.
+
+More information can be found on http://www.mysql.com/company/legal/licensing/
+
+The manual had to be removed as it is not free in the sense of the
+Debian Free Software Guidelines (DFSG). 
+
+> Appendix I MySQL FLOSS License Exception
+> ****************************************
+> 
+>                      Version 0.3, 10 February 2005
+> 
+> The MySQL AB Exception for Free/Libre and Open Source Software-only
+> Applications Using MySQL Client Libraries (the "FLOSS Exception").
+> 
+> Exception Intent
+> ================
+> 
+> We want specified Free/Libre and Open Source Software ("FLOSS")
+> applications to be able to use specified GPL-licensed MySQL client
+> libraries (the "Program") despite the fact that not all FLOSS licenses
+> are compatible with version 2 of the GNU General Public License (the
+> "GPL").
+> 
+> Legal Terms and Conditions
+> ==========================
+> 
+> As a special exception to the terms and conditions of version 2.0 of the
+> GPL:
+> 
+>   1. You are free to distribute a Derivative Work that is formed
+>      entirely from the Program and one or more works (each, a "FLOSS
+>      Work") licensed under one or more of the licenses listed below in
+>      section 1, as long as:
+> 
+>        a. You obey the GPL in all respects for the Program and the
+>           Derivative Work, except for identifiable sections of the
+>           Derivative Work which are not derived from the Program, and
+>           which can reasonably be considered independent and separate
+>           works in themselves,
+> 
+>        b. all identifiable sections of the Derivative Work which are not
+>           derived from the Program, and which can reasonably be
+>           considered independent and separate works in themselves,
+> 
+>          i
+>                are distributed subject to one of the FLOSS licenses
+>                listed below, and
+> 
+>          ii
+>                the object code or executable form of those sections are
+>                accompanied by the complete corresponding
+>                machine-readable source code for those sections on the
+>                same medium and under the same FLOSS license as the
+>                corresponding object code or executable forms of those
+>                sections, and
+> 
+>        c. any works which are aggregated with the Program or with a
+>           Derivative Work on a volume of a storage or distribution
+>           medium in accordance with the GPL, can reasonably be
+>           considered independent and separate works in themselves which
+>           are not derivatives of either the Program, a Derivative Work
+>           or a FLOSS Work.
+> 
+>      If the above conditions are not met, then the Program may only be
+>      copied, modified, distributed or used under the terms and
+>      conditions of the GPL or another valid licensing option from MySQL
+>      AB.
+> 
+>   2. FLOSS License List
+> 
+>      *License name*                           *Version(s)/Copyright Date*
+>      Academic Free License                    2.0
+>      Apache Software License                  1.0/1.1/2.0
+>      Apple Public Source License              2.0
+>      Artistic license                         From Perl 5.8.0
+>      BSD license                              "July 22 1999"
+>      Common Public License                    1.0
+>      GNU Library or "Lesser" General Public   2.0/2.1
+>      License (LGPL)                           
+>      Jabber Open Source License               1.0
+>      MIT license                              -
+>      Mozilla Public License (MPL)             1.0/1.1
+>      Open Software License                    2.0
+>      OpenSSL license (with original SSLeay    "2003" ("1998")
+>      license)                                 
+>      PHP License                              3.0
+>      Python license (CNRI Python License)     -
+>      Python Software Foundation License       2.1.1
+>      Sleepycat License                        "1999"
+>      W3C License                              "2001"
+>      X11 License                              "2001"
+>      Zlib/libpng License                      -
+>      Zope Public License                      2.0
+> 
+>      Due to the many variants of some of the above licenses, we require
+>      that any version follow the 2003 version of the Free Software
+>      Foundation's Free Software Definition
+>      (`http://www.gnu.org/philosophy/free-sw.html') or version 1.9 of
+>      the Open Source Definition by the Open Source Initiative
+>      (`http://www.opensource.org/docs/definition.php').
+> 
+>   3. Definitions
+> 
+>        a. Terms used, but not defined, herein shall have the meaning
+>           provided in the GPL.
+> 
+>        b. Derivative Work means a derivative work under copyright law.
+> 
+>   4. Applicability This FLOSS Exception applies to all Programs that
+>      contain a notice placed by MySQL AB saying that the Program may be
+>      distributed under the terms of this FLOSS Exception.  If you
+>      create or distribute a work which is a Derivative Work of both the
+>      Program and any other work licensed under the GPL, then this FLOSS
+>      Exception is not available for that work; thus, you must remove
+>      the FLOSS Exception notice from that work and comply with the GPL
+>      in all respects, including by retaining all GPL notices.  You may
+>      choose to redistribute a copy of the Program exclusively under the
+>      terms of the GPL by removing the FLOSS Exception notice from that
+>      copy of the Program, provided that the copy has never been
+>      modified by you or any third party.
+ 
+
+== innotop ==
+
+Author: Baron Schwartz <baron at xaprb.com>
+URL:    http://innotop.sourceforge.net
+
+License:
+> This software is dual licensed, either GPL version 2 or Artistic License.
+>
+> This package is free software; you can redistribute it and/or modify
+> it under the terms of the GNU General Public License as published by
+> the Free Software Foundation; either version 2 of the License, or
+> (at your option) any later version.
+>
+> This package is distributed in the hope that it will be useful,
+> but WITHOUT ANY WARRANTY; without even the implied warranty of
+> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+> GNU General Public License for more details.
+>
+> You should have received a copy of the GNU General Public License
+> along with this package; if not, write to the Free Software
+> Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License and the
+Artistic License can be found in `/usr/share/common-licenses/'.
+
+The upstream author explained here: http://bugs.gentoo.org/show_bug.cgi?id=14760
+that these licenses also apply to the following files:
+- innotop.html
+- InnoDBParser.pm

Added: mysql-dfsg-5.0/branches/unstable/debian/copyright.more
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/copyright.more	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/copyright.more	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,60 @@
+#
+# Some random bits of interest.
+#
+
+#
+# Arjen about OpenSSL
+#
+http://bugs.mysql.com/?id=6924
+Updated by:       Arjen Lentz
+Date:             2005-11-05
+
+Linking with the client library is covered by the FLOSS exception which
+includes OpenSSL now. So that's clean. Indeed, the OpenSSL is not
+compliant with the FSF free software guidelines, however it *is*
+compliant with the OSI guidelines. And that's good enough for us.
+Christian is correct in saying that the author of a GPL app that links
+with MySQL may find themselves in a licensing headache (or may not
+realize that OpenSSL is involved) but that is their responsibility.
+The MySQL client can be linked with a number of other licenses, it
+would not be feasible for MySQL to take over the responsibility for
+"the next level" of how combinations of licenses work out. There are
+too many possibilities, and combinations of more just 2 licenses.
+
+
+#
+# Steve Langasek about OpenSSL vs libmysqlclient
+#
+Subject: Bug#291945: eleventh-hour transition for mysql-using packages related to apache
+Date: Sat, 12 Feb 2005 00:39:58 -0800
+From: Steve Langasek <vorlon at debian.org>
+
+> > > > that's great to hear!  i'm cc'ing the relevant wishlist bug i have open
+> > > > against mysql-server.  christian: any chance of getting an openssl enabled
+> > > > version of the mysql-client and mysql-server packages?
+
+> > > Yes, I will re-enable openssl in the next upload.
+
+> > Please make sure this does not introduce an openssl dependency to
+> > libmysqlclient itself; just because MySQL AB have granted a license
+> > exception for OpenSSL does not mean everyone who links to libmysqlclient
+> > has done so.
+
+> > I know of at least one GPL-without-exception package that is now using
+> > libmysqlclient12 in Debian.
+
+> Nice, so we should check that any linked GPL library directly (obviuolsy) or
+> indirectly (with N=1,2,3... levels of indirection) linked against
+> openssl adds the exception.
+
+No, we should simply not be linking libmysqlclient against OpenSSL.  The
+exemption was needed because there exists software that uses both
+libmysqlclient and libssl, but making libmysqlclient itself use libssl just
+because we now have the exemption will cause licensing problems for
+applications which currently do *not* depend on libssl.
+
+> This is a great reason to move asap all possible programs to gnutls,
+> indeed.
+
+There are plenty of reasons to move software to gnutls, but doing so is
+non-trivial.

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.README.Maintainer
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.README.Maintainer	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.README.Maintainer	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,4 @@
+The examples directory includes files that might be needed by some
+developers:
+- header files not installed by default
+- the example file udf_example.cc

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.dirs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.dirs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.dirs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+usr/include/
+usr/lib/

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.docs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.docs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.docs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+EXCEPTIONS-CLIENT

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.examples
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.examples	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.examples	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+sql/udf_example.c

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.files
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.files	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.files	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,7 @@
+usr/bin/mysql_config
+usr/include/*
+usr/lib/*.a
+usr/lib/*.la
+usr/lib/mysql
+usr/share/man/man1/mysql_config.1
+usr/share/lintian/overrides/libmysqlclient15-dev

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.links
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.links	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.links	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+usr/lib/libmysqlclient.so.15	usr/lib/libmysqlclient.so
+usr/lib/libmysqlclient_r.so.15	usr/lib/libmysqlclient_r.so

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.lintian-overrides
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.lintian-overrides	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15-dev.lintian-overrides	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+libmysqlclient15-dev: dev-pkg-without-shlib-symlink usr/lib/libndbclient.so.0.0.0 usr/lib/libndbclient.so
+libmysqlclient15-dev: package-name-doesnt-match-sonames libndbclient0

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.NEWS
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.NEWS	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.NEWS	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,14 @@
+mysql-dfsg-5.0 (5.0.24-2) unstable; urgency=high
+
+  * Self-build binaries which link against libmysqlclient15_5.0.24-1 MUST be
+    rebuild as there was an unintended ABI change again!
+    (Read /usr/share/doc/libmysqlclient15off/README.Debian)
+
+ -- Christian Hammers <ch at debian.org>  Fri, 25 Aug 2006 21:47:35 +0200
+
+mysql-dfsg-5.0 (5.0.20-2) unstable; urgency=low
+
+  * Self-build binaries which link against libmysqlclient15 MUST be rebuild!
+    (Read /usr/share/doc/libmysqlclient15off/README.Debian)
+
+ -- Christian Hammers <ch at debian.org>  Sat, 15 Apr 2006 13:05:22 +0200

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.README.Debian
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.README.Debian	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.README.Debian	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,30 @@
+* Crashs on systems with Cyrix or other old i486 CPUs
+=====================================================
+
+As reported http://bugs.mysql.com/bug.php?id=21765 MySQL will segfault on very
+old CPUs that do not have support for the "cpuid" instruction.
+
+
+
+* Self-build binaries that are linked against libmysqlclient15 MUST be rebuild!
+===============================================================================
+
+This only affects binaries that are build on a Debian unstable/testing system
+before 2006-03-31 or version 5.0.19. "objdump -T myprogram | grep MYSQL_5.0"
+will give a couple of lines output in such a case.
+
+Until now libmysqlclient.so.15 had versioned symbols provided by a Debian
+patch. Now MySQL finally decided to adopt this patch but sadly chosed a
+different symbol name.
+
+Binaries linked against the old version of the library with my symbol name will
+not run with the new version with MySQL's symbol name ("version `MYSQL_5.0' not
+found"). The actual name /usr/lib/libmysqlclient.so.15 must stay because else
+binaries coming from systems other than Debian would never run on a Debian
+server.
+
+So the Debian package had to be renamed from "libmysqlclient15" to
+"libmysqlclient15off" and do now conflict with their former version.
+
+-- 2006-03-14, Christian Hammers <ch at debian.org>
+

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.dirs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.dirs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.dirs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+usr/lib/

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.docs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.docs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.docs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+EXCEPTIONS-CLIENT

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.files
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.files	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.files	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+usr/lib/libmysqlclient*.so.*

Added: mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.postinst
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.postinst	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/libmysqlclient15off.postinst	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,12 @@
+#!/bin/bash -e
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+# vim: ts=4
+
+

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.NEWS
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.NEWS	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.NEWS	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,6 @@
+mysql-dfsg-5.0 (5.0.24a-2) unstable; urgency=low
+
+  * This package now includes "mysqlreport" from hackmysql.com which generates
+    a friendly report on the performance relevant variables from SHOW STATUS.
+
+ -- Christian Hammers <ch at debian.org>  Sun,  3 Sep 2006 16:26:41 +0200

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.README.Debian
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.README.Debian	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.README.Debian	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,4 @@
+FAQ:
+
+Q: My <tab> completition is gone, why?
+A: You have "no-auto-rehash" in the "[mysql]" section of /etc/mysql/my.cnf!

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.dirs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.dirs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.dirs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,3 @@
+usr/bin/
+usr/share/man/man1/
+usr/share/perl5/

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.docs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.docs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.docs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,3 @@
+README
+EXCEPTIONS-CLIENT
+debian/additions/innotop/changelog.innotop

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.files
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.files	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.files	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,46 @@
+usr/bin/innotop
+usr/bin/myisam_ftdump
+usr/bin/mysql
+usr/bin/mysqlaccess
+usr/bin/mysqladmin
+usr/bin/mysqlbug
+usr/bin/mysqlcheck
+usr/bin/mysql_client_test
+usr/bin/mysql_client_test_embedded
+usr/bin/mysqldump
+usr/bin/mysqldumpslow
+usr/bin/mysql_explain_log
+usr/bin/mysql_find_rows
+usr/bin/mysql_fix_extensions
+usr/bin/mysqlimport
+usr/bin/mysqlreport
+usr/bin/mysqlshow
+usr/bin/mysql_tableinfo
+usr/bin/mysqltest_embedded
+usr/bin/mysqltestmanager
+usr/bin/mysqltestmanagerc
+usr/bin/mysqltestmanager-pwgen
+usr/bin/mysql_waitpid
+usr/sbin/mysqlmanager
+usr/share/lintian/overrides/mysql-client-5.0
+usr/share/man/man8/mysqlmanager.8
+usr/share/man/man1/innotop.1
+usr/share/man/man1/myisam_ftdump.1
+usr/share/man/man1/mysql.1
+usr/share/man/man1/mysqlaccess.1
+usr/share/man/man1/mysqladmin.1
+usr/share/man/man1/mysqlbug.1
+usr/share/man/man1/mysqlcheck.1
+usr/share/man/man1/mysqldump.1
+usr/share/man/man1/mysqldumpslow.1
+usr/share/man/man1/mysql_explain_log.1
+usr/share/man/man1/mysql_find_rows.1
+usr/share/man/man1/mysql_fix_extensions.1
+usr/share/man/man1/mysqlimport.1
+usr/share/man/man1/mysqlreport.1
+usr/share/man/man1/mysqlshow.1
+usr/share/man/man1/mysql_tableinfo.1
+usr/share/man/man1/mysql_waitpid.1
+usr/share/man/man1/mysql_client_test.1
+usr/share/man/man1/mysql_client_test_embedded.1
+usr/share/perl5/InnoDBParser.pm

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.links
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.links	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.links	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,3 @@
+usr/bin/mysqlcheck usr/bin/mysqlrepair
+usr/bin/mysqlcheck usr/bin/mysqlanalyze
+usr/bin/mysqlcheck usr/bin/mysqloptimize

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.lintian-overrides
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.lintian-overrides	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-client-5.0.lintian-overrides	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,3 @@
+mysql-client-5.0: package-has-a-duplicate-relation
+mysql-client-5.0: wrong-name-for-upstream-changelog usr/share/doc/mysql-client-5.0/changelog.innotop.gz
+mysql-client-5.0: pkg-not-in-package-test innotop

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-common.dirs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-common.dirs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-common.dirs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+etc/mysql/conf.d/

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-common.files
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-common.files	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-common.files	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+etc/mysql/my.cnf
+usr/share/mysql-common/internal-use-only

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-common.postrm
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-common.postrm	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-common.postrm	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+if [ "$1" = "purge" ]; then
+  rmdir /etc/mysql 2>/dev/null || true
+fi
+
+#DEBHELPER#

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-common.preinst
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-common.preinst	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-common.preinst	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,215 @@
+#!/bin/bash -e
+#
+# summary of how this script can be called:
+#        * <new-preinst> install
+#        * <new-preinst> install <old-version>
+#        * <new-preinst> upgrade <old-version>
+#        * <old-preinst> abort-upgrade <new-version>
+#
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
+
+# Try to stop the server in a sane way. If it does not success let the admin
+# do it himself. No database directories should be removed while the server
+# is running! Another mysqld in e.g. a different chroot is fine for us.
+stop_server() {
+    if [ ! -x /etc/init.d/mysql ]; then return; fi
+
+    set +e
+    if [ -x /usr/sbin/invoke-rc.d ]; then
+      cmd="invoke-rc.d mysql stop"
+    else
+      cmd="/etc/init.d/mysql stop"
+    fi
+    $cmd
+    errno=$?
+    set -e
+   
+    # 0=ok, 100=no init script (fresh install)
+    if [ "$errno" != 0 -a "$errno" != 100 ]; then
+      echo "${cmd/ */} returned $errno" 1>&2
+      echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
+      echo "Stop it yourself and try again!" 1>&2
+      exit 1
+    fi
+}
+
+start_server() {
+    if [ ! -x /etc/init.d/mysql ]; then return; fi
+
+    set +e
+    if [ -x /usr/sbin/invoke-rc.d ]; then
+      cmd="invoke-rc.d mysql start"
+    else
+      cmd="/etc/init.d/mysql start"
+    fi
+    $cmd
+    set -e
+}
+
+##### here's a bunch of helper functions for converting database formats ######
+
+cvt_get_param(){
+	/usr/sbin/mysqld --print-defaults \
+		| tr " " "\n" \
+		| grep -- "--$1" \
+		| tail -n 1 \
+		| cut -d= -f2
+}
+
+cvt_setup_stuff(){
+	mytmp=`mktemp -d -t mysql-ISAM-convert.XXXXXX`
+	cvt_log="$mytmp/conversion.log"
+	if [ ! -d "$mytmp" ]; then
+		echo "can't create temporary directory, oh well." >&2
+		exit 1
+	fi
+
+	chgrp mysql $mytmp
+	chmod g+rwx $mytmp
+	cvt_socket=${mytmp}/mysql.sock
+
+	cvt_mysqld="mysqld --skip-grant-tables --skip-networking --socket $cvt_socket"
+	cvt_mysql="mysql --socket $cvt_socket"
+	cvt_mysqladmin="mysqladmin --socket $cvt_socket"
+}
+
+cvt_get_databases(){
+	echo fetching database list ... >&2
+	$cvt_mysql -e 'show databases' | sed -n -e '2,$p'
+}
+
+cvt_get_tables(){
+	echo querying tables in $1 ... >&2
+	$cvt_mysql $1 -e 'show table status' | sed -n -e '2,$p' | \
+		cut -f 1,2 | grep -w 'ISAM$' | cut -f 1
+}
+
+cvt_convert_table(){
+	echo converting $1.$2 ... >&2
+	$cvt_mysql $1 -e "alter table $2 type=MyISAM"
+}
+
+cvt_wait_for_server(){
+	local count
+	echo -n waiting for server startup.. >&2
+	while ! $cvt_mysql </dev/null >/dev/null 2>&1; do
+		echo -n . >&2
+		sleep 1
+		count=".$count"
+		if [ -f $mytmp/mysql.done ]; then
+			echo "sorry... looks like the server crashed :(" >&2
+			return 1
+		elif [ "$count" = "...................." ]; then
+			echo "sorry... looks like the server didn't start :(" >&2
+			return 1
+		fi
+	done
+	echo ok. >&2
+}
+
+cvt_wait_for_exit(){
+	local count
+	echo -n waiting for server shutdown.. >&2
+	while [ ! -f $mytmp/mysql.done ]; do
+		echo -n . >&2
+		sleep 1
+		count=".$count"
+		if [ "$count" = "...................." ]; then
+			echo "hrm... guess it never started?" >&2
+			return 0
+		fi
+	done
+	echo ok. >&2
+}
+
+cvt_cleanup(){
+	local mysql_kids
+	rm -rf $mytmp
+	# kill any mysqld child processes left over.  there *shouldn't* be any,
+	# but let's not take chances with that
+	mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
+	if [ "$mysql_kids" ]; then
+		echo "strange, some mysql processes left around. killing them now." >&2
+		kill $mysql_kids
+		sleep 10
+		mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
+		if [ "$mysql_kids" ]; then
+			echo "okay, they're really not getting the hint..." >&2
+			kill -9 $mysql_kids
+		fi
+	fi
+}
+
+################################ main() ##########################
+
+# test if upgrading from non conffile state
+if [ "$1" = "upgrade" ] && [ -x /usr/sbin/mysqld ]; then
+	cvt_datadir=`cvt_get_param datadir`
+	# test for ISAM tables, which we must convert NOW
+	if [ -n "$cvt_datadir" ] && [ -d "$cvt_datadir" ] && [ -n "`find $cvt_datadir -name '*.ISM' 2>/dev/null`" ]; then
+		pidfile=`cvt_get_param pid-file`
+		if [ "$pidfile" ] && [ -f "$pidfile" ]; then
+			server_pid=`cat $pidfile`
+			if [ "$server_pid" ] && ps $server_pid >/dev/null 2>&1; then
+				server_running="yes"
+			fi
+		fi
+		# to be sure
+		stop_server
+
+		set +e
+		cat << EOF >&2
+----------------------------------------
+WARNING WARNING WARNING
+----------------------------------------
+
+It has been detected that are are using ISAM format on some of your
+mysql database tables.  This format has been deprecated and no longer
+supported.  to prevent these databases from essentially disappearing,
+an attempt at format conversion will now be made.  please check after
+your upgrade that all tables are present and accounted for.
+
+apologies for the noise, but we thought you'd appreciate it :)
+
+----------------------------------------
+WARNING WARNING WARNING
+----------------------------------------
+EOF
+		cvt_setup_stuff
+		($cvt_mysqld >$cvt_log 2>&1; touch $mytmp/mysql.done ) &
+
+		if cvt_wait_for_server; then
+			dbs=`cvt_get_databases`
+			for db in $dbs; do
+				tables=`cvt_get_tables $db`
+				for tbl in $tables; do
+					cvt_convert_table $db $tbl
+				done
+			done
+		else
+			cvt_error="yes"
+		fi
+
+		echo shutting down server... >&2
+		$cvt_mysqladmin shutdown
+		cvt_wait_for_exit
+		echo "all done!" >&2
+		if [ ! "$cvt_error" = "yes" ]; then
+			cvt_cleanup
+		else
+			echo "you might want to look in $mytmp..." >&2
+		fi
+
+		if [ "$server_running" ]; then
+			start_server
+		fi
+
+		set -e
+	fi
+fi
+
+exit 0

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.NEWS
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.NEWS	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.NEWS	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,24 @@
+mysql-dfsg-5.0 (5.0.67-1) experimental; urgency=low
+
+  * The FEDERATED storage engine is now disabled by default in the .cnf files
+    shipped with MySQL distributions.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sun, 10 Aug 2008 07:55:41 +0200
+
+mysql-dfsg-5.0 (5.0.45-2) unstable; urgency=low
+
+  * Binary logging is now disabled by default. If you really need it (e.g. on
+    a replication master), remove the comment from the log_bin line in my.cnf.
+
+ -- Norbert Tretkowski <nobse at debian.org>  Sat, 10 Nov 2007 16:26:35 +0100
+
+mysql-dfsg-5.0 (5.0.18-9) unstable; urgency=low
+
+  * Rotation of the binary logs is now configured in /etc/mysql/my.cnf with
+    "expire-logs-days" which defaults to 20 days. The old file
+    /etc/mysql/debian-log-rotate.conf should be removed together with
+    /etc/cron.daily/mysql-server after this value has been adjusted. Note that
+    the old variable defined the number of files whereas the new one defines 
+    a time span in days.
+
+ -- Christian Hammers <ch at debian.org>  Tue, 24 Jan 2006 22:18:21 +0100

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.README.Debian
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.README.Debian	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.README.Debian	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,131 @@
+
+*                     REMEMBER TO SET THE ROOT PASSWORD !!!
+============================================================================
+
+* MYSQL WON'T INSTALL?
+======================
+MySQL will only install if you have a non-numeric hostname that is resolvable
+via the /etc/hosts file. E.g. if the "hostname" command returns "myhostname"
+then there must be a line like "10.0.0.1 myhostname".
+
+On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in place of
+/var/lib/mysql or /var/log/mysql gets accidently removed and have manually be
+restored.
+
+* MYSQL WON'T START OR STOP?
+============================
+You may never ever delete the special mysql user "debian-sys-maint". This
+user together with the credentials in /etc/mysql/debian.cnf are used by the
+init scripts to stop the server as they would require knowledge of the mysql
+root users password else.
+So in most of the times you can fix the situation by making sure that the
+debian.cnf file contains the right password, e.g. by setting a new one
+(remember to do a "flush privileges" then).
+
+* WHAT TO DO AFTER UPGRADES:
+============================
+The privilege tables are automatically updated so all there is left is read
+the changelogs on dev.mysql.com to see if any changes affect custom apps.
+
+* WHAT TO DO AFTER INSTALLATION:
+================================
+The MySQL manual describes certain steps to do at this stage in a separate
+chapter.  They are not necessary as the Debian packages does them
+automatically.
+
+The only thing that is left over for the admin is 
+ - setting the *passwords* !!!
+ - creating new users and databases
+ - read the rest of this text
+
+* DOWNGRADING TO 4.0 or 4.1:
+============================
+Unsupported. Period.
+But if you do and get problems or make interesting experiences, mail me, it
+might help others.
+Ok, if you really want, I would recommend to "mysqldump --opt" all tables,
+then purge 4.1, delete /var/lib/mysql, install 4.0 and insert the dumps.  Be
+carefully, though, with the "mysql" table, you might not simply overwrite that
+one as the password for the mysql "debian-sys-maint" user is stored in
+/etc/mysql/debian.cnf and needed by /etc/init.d/ to start mysql and check if
+it's alive. 
+
+* SOME APPLICATION CAN NO LONGER CONNECT:
+=========================================
+This application is probably linked against libmysqlclient12 or below and
+somebody has created a mysql user with new-style passwords.
+The old_passwords option which forces backwards compatibility, can be set 
+with "dpkg-reconfigure mysql-server-5.0".
+If that does not help, the password can be set manually, the application that 
+inserted the user should be changed or the application that tries to connect 
+should be updated to libmysqlclient14 or -15. 
+Read http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+
+* NETWORKING:
+=============
+For security reasons, the Debian package has enabled networking only on the
+loop-back device using "bind-address" in /etc/mysql/my.cnf.  Check with
+"netstat -tlnp" where it is listening. If your connection is aborted
+immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read
+hosts_access(5).
+
+* WHERE IS THE DOCUMENTATION?:
+==============================
+Unfortunately due to licensing restrictions, debian currently not able
+to provide the mysql-doc package in any format.  For the most up to date
+documentation, please go to http://dev.mysql.com/doc.
+
+* PASSWORDS:
+============
+It is strongly recommended to set a password for the mysql root user (which
+is NOT the same as the "normal" root user) with these commands:
+  /usr/bin/mysql -u root -D mysql -e "update user set password=password('new-password') where user='root'"
+  /usr/bin/mysql -u root -e "flush privileges"
+If you already had a password set add "-p" before "-u" to the lines above.
+
+If you are tired to type the password in every time or want to automate your
+scripts you can store it in the file $HOME/.my.cnf. It should be chmod 0600
+(-rw------- username username .my.cnf) to ensure that nobody else can read
+it.  Every other configuration parameter can be stored there, too. You will
+find an example below and more information in the MySQL manual in
+/usr/share/doc/mysql-doc or www.mysql.com.
+
+ATTENTION: It is necessary, that a .my.cnf from root always contains a "user"
+line wherever there is a "password" line, else, the Debian maintenance
+scripts, that use /etc/mysql/debian.cnf, will use the username
+"debian-sys-maint" but the password that is in root's .my.cnf. Also note,
+that every change you make in the /root/.my.cnf will affect the mysql cron
+script, too.
+
+        # an example of $HOME/.my.cnf
+	[client]
+	user		= your-mysql-username
+	password	= enter-your-good-new-password-here
+
+* BIG_ROWS FOR EVEN MORE ROWS IN A TABLE:
+=========================================
+If you ever run out of rows in a table there is the possibility of building
+the package with "-DBIG_ROWS" which, according to a MySQL employee on
+packagers at lists.mysql.com should lead to a 64bit row index (I guess > 2^32
+rows) but also to an approx. 5% performance loss.
+
+* NDB CLUSTER ENGINE:
+=====================
+NDB is the shared-nothing cluster engine since MySQL-4.1.
+This package contains the all three components, the mysql backend, the NDB
+Data Node and the NDB Management Node. The init scripts of the cluster
+daemons will silently exit unless their configuration is provided:
+ mysql-ndb:	needs "ndb-connectstring" in /etc/mysql/my.cnf
+ mysql-ndb-mgm: needs /etc/mysql/ndb_mgmd.cnf
+Because of the need to perform rolling restarts of the cluster during an
+upgrade, neither ndbd or ndb_mgmd will restart during a package upgrade. 
+
+* FURTHER NOTES ON REPLICATION
+===============================
+Іf the MySQL server is acting as a replication slave, you should not
+set --tmpdir to point to a directory on a memory-based filesystem or to
+a directory that is cleared when the server host restarts. A replication
+slave needs some of its temporary files to survive a machine restart so
+that it can replicate temporary tables or LOAD DATA INFILE operations. If
+files in the temporary file directory are lost when the server restarts,
+replication fails.

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.config
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.config	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.config	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,70 @@
+#!/bin/bash -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+CNF=/etc/mysql/my.cnf
+
+# 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
+  db_input high mysql-server-5.0/nis_warning || true
+  db_go
+fi
+
+# only ask this question on fresh installs and during "reconfiguration".  
+# there is also an additional check for empty root passwords in the
+# postinst script when the tools are available for us to use.
+if [ "$1" = "configure" ] && [ -z "$2" ] || [ "$1" = "reconfigure" ]; then
+  while :; do
+    RET=""
+    db_input medium mysql-server/root_password || true
+    db_go
+    db_get mysql-server/root_password
+    # if password isn't empty we ask for password verification
+    if [ -z "$RET" ]; then
+      db_fset mysql-server/root_password seen false
+      db_fset mysql-server/root_password_again seen false
+      break
+    fi
+    ROOT_PW="$RET"
+    db_input medium mysql-server/root_password_again || true
+    db_go
+    db_get mysql-server/root_password_again
+    if [ "$RET" == "$ROOT_PW" ]; then
+      ROOT_PW=''
+      break
+    fi
+    db_fset mysql-server/password_mismatch seen false
+    db_input critical mysql-server/password_mismatch
+    db_set mysql-server/root_password "" 
+    db_set mysql-server/root_password_again ""
+    db_go
+  done
+fi
+
+# If this is an upgrade of an already existing installation ask the user if
+# we may use the backwards incompatible but more secure password format.
+# This should not be shown at dpkg-reconfigure, except for the dist-upgrade,
+# my.cnf is for the admin only!
+# Read: If mysql was already installed but not from Etch and it was either 4.0
+# or had old_passwords enabled before then the system is affected.
+if [ -n "$DEBIAN_SCRIPT_TRACE" ]; then
+  set +e
+  [ "$1" = "configure" ]; x1=$?
+  [ -f $CNF ]; x2=$?
+  [ ! -f /var/lib/mysql/debian-4.1.flag ]; x31=$?
+  egrep -q -i '^[[:space:]]*old.passwords[[:space:]]*=[[:space:]]*(1|true)' $CNF; x32=$?
+  set -e
+fi 
+if [ "$1" = "configure" ] && 
+   [ -f $CNF ] && 
+   (
+     [ ! -f /var/lib/mysql/debian-4.1.flag ] ||
+     egrep -q -i '^[[:space:]]*old.passwords[[:space:]]*=[[:space:]]*(1|true)' $CNF
+   ) 
+then
+	db_input medium mysql-server-5.0/need_sarge_compat || true
+	db_go
+fi

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.dirs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.dirs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.dirs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,9 @@
+etc/init.d
+etc/logrotate.d
+usr/bin
+usr/sbin
+usr/share/man/man8
+usr/share/mysql
+var/run/mysqld
+var/lib/mysql-upgrade
+var/lib/mysql-cluster

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.docs
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.docs	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.docs	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+EXCEPTIONS-CLIENT
+debian/copyright.more

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.files
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.files	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.files	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,87 @@
+etc/mysql/debian-start
+usr/bin/comp_err
+usr/bin/innochecksum
+usr/bin/msql2mysql
+usr/bin/myisamchk
+usr/bin/myisamlog
+usr/bin/myisampack
+usr/bin/my_print_defaults
+usr/bin/mysqlbinlog
+usr/bin/mysql_convert_table_format
+usr/bin/mysqld_multi
+usr/bin/mysqld_safe
+usr/bin/mysql_fix_privilege_tables
+usr/bin/mysqlhotcopy
+usr/bin/mysql_install_db
+usr/bin/mysql_secure_installation
+usr/bin/mysql_setpermission
+usr/bin/mysqltest
+usr/bin/mysql_tzinfo_to_sql
+usr/bin/mysql_upgrade
+usr/bin/mysql_upgrade_shell
+usr/bin/mysql_zap
+usr/bin/ndb_config
+usr/bin/ndb_delete_all
+usr/bin/ndb_desc
+usr/bin/ndb_drop_index
+usr/bin/ndb_drop_table
+usr/bin/ndb_error_reporter
+usr/bin/ndb_mgm
+usr/bin/ndb_restore
+usr/bin/ndb_select_all
+usr/bin/ndb_select_count
+usr/bin/ndb_show_tables
+usr/bin/ndb_size
+usr/bin/ndb_test_platform
+usr/bin/ndb_waiter
+usr/bin/perror
+usr/bin/replace
+usr/bin/resolveip
+usr/bin/resolve_stack_dump
+usr/sbin/mysqld
+usr/sbin/ndbd
+usr/sbin/ndb_mgmd
+usr/share/doc/mysql-server-5.0/
+usr/share/lintian/overrides/mysql-server-5.0
+usr/share/man/man1/comp_err.1
+usr/share/man/man1/msql2mysql.1
+usr/share/man/man1/myisamchk.1
+usr/share/man/man1/myisamlog.1
+usr/share/man/man1/myisampack.1
+usr/share/man/man1/my_print_defaults.1
+usr/share/man/man1/mysqlbinlog.1
+usr/share/man/man1/mysql_convert_table_format.1
+usr/share/man/man1/mysqld_multi.1
+usr/share/man/man1/mysqld_safe.1
+usr/share/man/man1/mysql_fix_privilege_tables.1
+usr/share/man/man1/mysqlhotcopy.1
+usr/share/man/man1/mysql_install_db.1
+usr/share/man/man1/mysql_secure_installation.1
+usr/share/man/man1/mysql_setpermission.1
+usr/share/man/man1/mysqltest.1
+usr/share/man/man1/mysql_upgrade.1
+usr/share/man/man1/mysql_zap.1
+usr/share/man/man1/perror.1
+usr/share/man/man1/replace.1
+usr/share/man/man1/resolveip.1
+usr/share/man/man1/resolve_stack_dump.1
+usr/share/man/man1/innochecksum.1
+usr/share/man/man1/mysqltest_embedded.1
+usr/share/man/man1/mysql_tzinfo_to_sql.1
+usr/share/man/man1/ndb_config.1
+usr/share/man/man1/ndb_delete_all.1
+usr/share/man/man1/ndb_desc.1
+usr/share/man/man1/ndb_drop_index.1
+usr/share/man/man1/ndb_drop_table.1
+usr/share/man/man1/ndb_error_reporter.1
+usr/share/man/man1/ndb_mgm.1
+usr/share/man/man1/ndb_restore.1
+usr/share/man/man1/ndb_select_all.1
+usr/share/man/man1/ndb_select_count.1
+usr/share/man/man1/ndb_show_tables.1
+usr/share/man/man1/ndb_size.pl.1
+usr/share/man/man1/ndb_waiter.1
+usr/share/man/man8/mysqld.8
+usr/share/man/man8/ndb_mgmd.8
+usr/share/man/man8/ndbd.8
+usr/share/mysql/

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.links
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.links	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.links	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,2 @@
+usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
+usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.lintian-overrides
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.lintian-overrides	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.lintian-overrides	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,4 @@
+mysql-server-5.0: possible-bashism-in-maintainer-script postinst:81 'p{("a".."z","A".."Z",0..9)[int(rand(62))]}'
+mysql-server-5.0: possible-bashism-in-maintainer-script preinst:33 '${cmd/ */}'
+mysql-server-5.0: statically-linked-binary ./usr/bin/mysql_tzinfo_to_sql
+mysql-server-5.0: statically-linked-binary ./usr/sbin/mysqld

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.paranoid
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.paranoid	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.paranoid	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,11 @@
+/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
+/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
+/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$
+mysqld\[[0-9]+\]: $
+mysqld\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com$
+mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock'  port: 3306$
+mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$
+mysqld_safe\[[0-9]+\]: started$
+mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com *$
+usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$
+usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.server
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.server	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.server	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,32 @@
+/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
+/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
+/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
+/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$
+mysqld\[[0-9]+\]: ?$
+mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed
+mysqld\[[0-9]+\]: .*InnoDB: Started;
+mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$
+mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$
+mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$
+mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$
+mysqld\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com$
+mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$
+mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$
+mysqld\[[0-9]+\]: Version: .* socket
+mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$
+mysqld_safe\[[0-9]+\]: ?$
+mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$
+mysqld_safe\[[0-9]+\]: ended$
+mysqld_safe\[[0-9]+\]: http://www.mysql.com$
+mysqld_safe\[[0-9]+\]: NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run$
+mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$
+mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$
+mysqld_safe\[[0-9]+\]: See the manual for more instructions.$
+mysqld_safe\[[0-9]+\]: started$
+mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at
+mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$
+mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$
+mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$
+mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$
+usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$
+usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.workstation
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.workstation	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.logcheck.ignore.workstation	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,32 @@
+/etc/init.d/mysql\[[0-9]+\]: [0-9]+ processes alive and '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
+/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
+/etc/init.d/mysql\[[0-9]+\]: '/usr/bin/mysqladmin --defaults-(extra-)?file=/etc/mysql/debian.cnf ping' resulted in$
+/etc/mysql/debian-start\[[0-9]+\]: Checking for crashed MySQL tables\.$
+mysqld\[[0-9]+\]: ?$
+mysqld\[[0-9]+\]: .*InnoDB: Shutdown completed
+mysqld\[[0-9]+\]: .*InnoDB: Started;
+mysqld\[[0-9]+\]: .*InnoDB: Starting shutdown\.\.\.$
+mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Normal shutdown$
+mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: ready for connections\.$
+mysqld\[[0-9]+\]: .*\[Note\] /usr/sbin/mysqld: Shutdown complete$
+mysqld\[[0-9]+\]: Support MySQL by buying support/licenses at http://shop.mysql.com$
+mysqld\[[0-9]+\]: /usr/sbin/mysqld: ready for connections\.$
+mysqld\[[0-9]+\]: .*/usr/sbin/mysqld: Shutdown Complete$
+mysqld\[[0-9]+\]: Version: .* socket
+mysqld\[[0-9]+\]: Warning: Ignoring user change to 'mysql' because the user was set to 'mysql' earlier on the command line$
+mysqld_safe\[[0-9]+\]: ?$
+mysqld_safe\[[0-9]+\]: able to use the new GRANT command!$
+mysqld_safe\[[0-9]+\]: ended$
+mysqld_safe\[[0-9]+\]: http://www.mysql.com$
+mysqld_safe\[[0-9]+\]: NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run$
+mysqld_safe\[[0-9]+\]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !$
+mysqld_safe\[[0-9]+\]: Please report any problems with the /usr/bin/mysqlbug script!$
+mysqld_safe\[[0-9]+\]: See the manual for more instructions.$
+mysqld_safe\[[0-9]+\]: started$
+mysqld_safe\[[0-9]+\]: Support MySQL by buying support/licenses at
+mysqld_safe\[[0-9]+\]: The latest information about MySQL is available on the web at$
+mysqld_safe\[[0-9]+\]: the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be$
+mysqld_safe\[[0-9]+\]: To do so, start the server, then issue the following commands:$
+mysqld_safe\[[0-9]+\]: /usr/bin/mysqladmin -u root password 'new-password'$
+usermod\[[0-9]+\]: change user `mysql' GID from `([0-9]+)' to `\1'$
+usermod\[[0-9]+\]: change user `mysql' shell from `/bin/false' to `/bin/false'$

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb-mgm.init
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb-mgm.init	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb-mgm.init	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides:          mysql-ndb-mgm
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Should-Start:      $network $named $time
+# Should-Stop:       $network $named $time
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start and stop the mysql database cluster management daemon
+# Description:       Controls the MySQL NDB Management Node daemon "ndb_mgmd".
+### END INIT INFO
+#
+set -e
+set -u
+${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
+
+# Variables
+SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
+DAEMON=/usr/sbin/ndb_mgmd
+CONF=/etc/mysql/ndb_mgmd.cnf
+export HOME=/etc/mysql/
+
+# Safeguard (relative paths, core dumps..)
+cd /
+umask 077
+
+# Exit *silently* if we're not supposed to be started.
+#
+# The Debian scripts should execute these scripts to stop and start
+# the daemon when upgrading if it is started. On the other hand it should
+# remain silently if the server has not even been configured.
+# See /usr/share/doc/mysql-server-*/README.Debian for more information.
+test -x $DAEMON || exit 0
+test -r $CONF || exit 0
+. /lib/lsb/init-functions
+
+#
+# main()
+#
+case "${1:-''}" in
+  'start')
+	# Start daemon
+	log_daemon_msg "Starting MySQL NDB Management Node" "ndb_mgmd"
+	# --pid-file does not work as the daemon forks itself with $PID=$PID+1
+	if start-stop-daemon \
+		--start \
+		--exec $DAEMON \
+		--user mysql \
+		-- \
+		-f $CONF
+	then
+	  log_end_msg 0
+	else
+	  log_end_msg 1
+	  log_warning_msg "Please take a look at the syslog."
+	  exit 1
+	fi			  
+	;;
+
+  'stop')
+  	log_daemon_msg "Stopping MySQL NDB Management Node" "ndb_mgmd"	
+	if start-stop-daemon \
+		--stop \
+		--oknodo \
+		--exec $DAEMON
+	then
+	  log_end_msg 0
+	else
+	  log_end_msg 1
+	  exit 1
+        fi
+	;;
+
+  'restart'|'force-reload')
+	set +e; $SELF stop; set -e
+	$SELF start 
+	;;
+
+  *)
+	echo "Usage: $SELF start|stop|restart|force-reload"
+	exit 1
+	;;
+esac
+

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb.init
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb.init	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-ndb.init	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,103 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides:          mysql-ndb
+# Required-Start:    $remote_fs $syslog mysql-ndb-mgm
+# Required-Stop:     $remote_fs $syslog mysql-ndb-mgm
+# Should-Start:      $network $named $time
+# Should-Stop:       $network $named $time
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start and stop the mysql database cluster server daemon
+# Description:       Controls the MySQL NDB Data Node daemon "ndbd".
+### END INIT INFO
+#
+set -e
+set -u
+${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
+
+# Variables
+SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
+DAEMON=/usr/sbin/ndbd
+CONF=/etc/mysql/my.cnf
+export HOME=/etc/mysql/
+
+# Safeguard (relative paths, core dumps..)
+cd /
+umask 077
+
+# Exit *silently* if we're not supposed to be started.
+#
+# The Debian scripts should execute these scripts to stop and start
+# the daemon when upgrading if it is started. On the other hand it should
+# remain silently if the server has not even been configured.
+# See /usr/share/doc/mysql-server-*/README.Debian for more information.
+test -x $DAEMON || exit 0
+if $DAEMON --help | grep -q '^ndb-connectstring.*No default value'; then exit 0; fi
+. /lib/lsb/init-functions
+
+#
+# main()
+#
+case "${1:-''}" in
+  'start')
+	# Start daemon
+        # Creatign a PID file does not work as the master process forks
+        # a child with different PID and then terminates itself.
+	log_daemon_msg "Starting MySQL NDB Data Node" "ndbd"
+	if start-stop-daemon \
+		--start \
+		--exec $DAEMON \
+		--user mysql
+	then
+	  log_end_msg 0
+	else
+	  log_end_msg 1
+	  log_warning_msg "Please take a look at the syslog."
+	  exit 1
+	fi			  
+	;;
+
+  'start-initial')
+        # Perform an initial start of ndbd
+        log_daemon_msg "Initial start of MySQL NDB Data Node" "ndbd"
+        if start-stop-daemon \
+                --start \
+                --exec $DAEMON \
+                --user mysql \
+                -- --initial
+        then
+          log_end_msg 0
+        else
+          log_end_msg 1
+          log_warning_msg "Please take a look at the syslog."
+          exit 1
+        fi  
+        ;;
+
+  'stop')
+	log_daemon_msg "Stopping MySQL NDB Data Node" "ndbd"	
+	if start-stop-daemon \
+		--stop \
+		--oknodo \
+		--exec $DAEMON
+	then
+	  log_end_msg 0
+	else
+	  log_end_msg 1
+	  exit 1
+        fi
+	;;
+
+  'restart'|'force-reload')
+	set +e; $SELF stop; set -e
+	$SELF start 
+	;;
+
+  *)
+	echo "Usage: $SELF start|start-initial|stop|restart|force-reload"
+	echo " * start-initial starts ndbd with '--initial'"
+	exit 1
+	;;
+esac
+

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-server.logrotate
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-server.logrotate	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql-server.logrotate	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,27 @@
+# - I put everything in one block and added sharedscripts, so that mysql gets 
+#   flush-logs'd only once.
+#   Else the binary logs would automatically increase by n times every day.
+# - The error log is obsolete, messages go to syslog now.
+/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log {
+	daily
+	rotate 7
+	missingok
+	create 640 mysql adm
+	compress
+	sharedscripts
+	postrotate
+		test -x /usr/bin/mysqladmin || exit 0
+
+		# If this fails, check debian.conf! 
+		MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+		if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then
+		  # Really no mysqld or rather a missing debian-sys-maint user?
+		  # If this occurs and is not a error please report a bug.
+		  if ps cax | grep -q mysqld; then
+ 		    exit 1
+		  fi 
+		else
+		  $MYADMIN flush-logs
+		fi
+	endscript
+}

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql.init
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql.init	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.mysql.init	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,193 @@
+#!/bin/bash
+#
+### BEGIN INIT INFO
+# Provides:          mysql
+# Required-Start:    $remote_fs $syslog mysql-ndb
+# Required-Stop:     $remote_fs $syslog mysql-ndb
+# Should-Start:      $network $named $time
+# Should-Stop:       $network $named $time
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start and stop the mysql database server daemon
+# Description:       Controls the main MySQL database server daemon "mysqld"
+#                    and its wrapper script "mysqld_safe".
+### END INIT INFO
+#
+set -e
+set -u
+${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
+
+test -x /usr/sbin/mysqld || exit 0
+
+. /lib/lsb/init-functions
+
+# NOTE: Copying this script and changing the CONF variable here isn't
+# enough to run multiple instances of mysqld. Debian/Ubuntu doesn't 
+# currently support such a configuration out of the box.
+CONF=/etc/mysql/my.cnf
+SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
+MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+
+# priority can be overriden and "-s" adds output to stderr
+ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"
+
+# Safeguard (relative paths, core dumps..)
+cd /
+umask 077
+
+# mysqladmin likes to read /root/.my.cnf. This is usually not what I want
+# as many admins e.g. only store a password without a username there and
+# so break my scripts.
+export HOME=/etc/mysql/
+
+## Fetch a particular option from mysql's invocation.
+#
+# Usage: void mysqld_get_param option
+mysqld_get_param() {
+	/usr/sbin/mysqld --print-defaults \
+		| tr " " "\n" \
+		| grep -- "--$1" \
+		| tail -n 1 \
+		| cut -d= -f2
+}
+
+## Do some sanity checks before even trying to start mysqld.
+sanity_checks() {
+  # check for config file
+  if [ ! -r "$CONF" ]; then
+    log_warning_msg "$0: WARNING: $CONF cannot be read. See README.Debian.gz"
+    echo                "WARNING: $CONF cannot be read. See README.Debian.gz" | $ERR_LOGGER
+  fi
+
+  # check for diskspace shortage
+  datadir=`mysqld_get_param datadir`
+  if LC_ALL=C BLOCKSIZE= df --portability $datadir/. | tail -n 1 | awk '{ exit ($4>4096) }'; then
+    log_failure_msg "$0: ERROR: The partition with $datadir is too full!"
+    echo                "ERROR: The partition with $datadir is too full!" | $ERR_LOGGER
+    exit 1
+  fi
+}
+
+## Checks if there is a server running and if so if it is accessible.
+#
+# check_alive insists on a pingable server
+# check_dead also fails if there is a lost mysqld in the process list
+#
+# Usage: boolean mysqld_status [check_alive|check_dead] [warn|nowarn]
+mysqld_status () {
+    ping_output=`$MYADMIN ping 2>&1`; ping_alive=$(( ! $? ))
+
+    ps_alive=0
+    pidfile=`mysqld_get_param pid-file`
+    if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi
+    
+    if [ "$1" = "check_alive"  -a  $ping_alive = 1 ] ||
+       [ "$1" = "check_dead"   -a  $ping_alive = 0  -a  $ps_alive = 0 ]; then
+	return 0 # EXIT_SUCCESS
+    else
+  	if [ "$2" = "warn" ]; then
+  	    echo -e "$ps_alive processes alive and '$MYADMIN ping' resulted in\n$ping_output\n" | $ERR_LOGGER -p daemon.debug
+	fi
+  	return 1 # EXIT_FAILURE
+    fi
+}
+
+#
+# main()
+#
+
+case "${1:-''}" in
+  'start')
+	sanity_checks;
+	# Start daemon
+	log_daemon_msg "Starting MySQL database server" "mysqld"
+	if mysqld_status check_alive nowarn; then
+	   log_progress_msg "already running"
+	   log_end_msg 0
+	else
+  	    /usr/bin/mysqld_safe > /dev/null 2>&1 &
+	    # 6s was reported in #352070 to be too few when using ndbcluster
+	    for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
+                sleep 1
+	        if mysqld_status check_alive nowarn ; then break; fi
+		log_progress_msg "."
+	    done
+	    if mysqld_status check_alive warn; then
+                log_end_msg 0
+	        # Now start mysqlcheck or whatever the admin wants.
+	        output=$(/etc/mysql/debian-start)
+		[ -n "$output" ] && log_action_msg "$output"
+	    else
+	        log_end_msg 1
+		log_failure_msg "Please take a look at the syslog"
+	    fi
+	fi
+
+	# Some warnings
+        if $MYADMIN variables | egrep -q have_bdb.*YES; then
+            echo "BerkeleyDB is obsolete, see /usr/share/doc/mysql-server-5.0/README.Debian.gz" | $ERR_LOGGER -p daemon.info
+        fi
+        if [ -f /etc/mysql/debian-log-rotate.conf ]; then
+            echo "/etc/mysql/debian-log-rotate.conf is obsolete, see /usr/share/doc/mysql-server-5.0/NEWS.Debian.gz" | $ERR_LOGGER -p daemon.info
+        fi
+	;;
+
+  'stop')
+	# * As a passwordless mysqladmin (e.g. via ~/.my.cnf) must be possible
+	# at least for cron, we can rely on it here, too. (although we have 
+	# to specify it explicit as e.g. sudo environments points to the normal
+	# users home and not /root)
+	log_daemon_msg "Stopping MySQL database server" "mysqld"
+	if ! mysqld_status check_dead nowarn; then
+	  set +e
+	  shutdown_out=`$MYADMIN shutdown 2>&1`; r=$?
+	  set -e
+	  if [ "$r" -ne 0 ]; then
+	    log_end_msg 1
+	    [ "$VERBOSE" != "no" ] && log_failure_msg "Error: $shutdown_out"
+	    log_daemon_msg "Killing MySQL database server by signal" "mysqld"
+	    killall -15 mysqld
+            server_down=
+	    for i in 1 2 3 4 5 6 7 8 9 10; do
+              sleep 1
+              if mysqld_status check_dead nowarn; then server_down=1; break; fi
+            done
+          if test -z "$server_down"; then killall -9 mysqld; fi
+	  fi
+        fi
+
+        if ! mysqld_status check_dead warn; then
+	  log_end_msg 1
+	  log_failure_msg "Please stop MySQL manually and read /usr/share/doc/mysql-server-5.0/README.Debian.gz!"
+	  exit -1
+	else
+	  log_end_msg 0
+        fi
+	;;
+
+  'restart')
+	set +e; $SELF stop; set -e
+	$SELF start 
+	;;
+
+  'reload'|'force-reload')
+  	log_daemon_msg "Reloading MySQL database server" "mysqld"
+	$MYADMIN reload
+	log_end_msg 0
+	;;
+
+  'status')
+	if mysqld_status check_alive nowarn; then
+	  log_action_msg "$($MYADMIN version)"
+	else
+	  log_action_msg "MySQL is stopped."
+	  exit 3
+	fi
+  	;;
+
+  *)
+	echo "Usage: $SELF start|stop|restart|reload|force-reload|status"
+	exit 1
+	;;
+esac
+

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postinst
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postinst	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postinst	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,276 @@
+#!/bin/bash -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+ 
+export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
+
+# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
+ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
+
+invoke() {
+  if [ -x /usr/sbin/invoke-rc.d ]; then
+    invoke-rc.d mysql $1
+  else
+    /etc/init.d/mysql $1
+  fi
+}
+
+MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables  --skip-bdb  --skip-innodb --skip-ndbcluster"
+
+test_mysql_access() {
+	mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
+}
+
+# call with $1 = "online" to connect to the server, otherwise it bootstraps
+set_mysql_rootpw() {
+	# forget we ever saw the password.  don't use reset to keep the seen status
+	db_set mysql-server/root_password ""
+
+	tfile=`mktemp`
+	if [ ! -f "$tfile" ]; then
+		return 1
+	fi
+
+	# this avoids us having to call "test" or "[" on $rootpw
+	cat << EOF > $tfile
+USE mysql;
+UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
+FLUSH PRIVILEGES;
+EOF
+	if grep -q 'PASSWORD("")' $tfile; then
+		retval=0
+	elif [ "$1" = "online" ]; then
+		mysql --no-defaults -u root -h localhost <$tfile >/dev/null
+		retval=$?
+	else
+		$MYSQL_BOOTSTRAP <$tfile
+		retval=$?
+	fi
+	rm -f $tfile
+	return $retval
+}
+
+# This is necessary because mysql_install_db removes the pid file in /var/run
+# 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
+# script fails. I can't tell at this point because of the cleaned /var/run.
+set +e; invoke stop; set -e
+    
+case "$1" in
+  configure)
+    mysql_cnf=/etc/mysql/my.cnf
+    mysql_datadir=/usr/share/mysql
+    mysql_statedir=/var/lib/mysql
+    mysql_rundir=/var/run/mysqld
+    mysql_logdir=/var/log
+    mysql_cfgdir=/etc/mysql
+    mysql_newlogdir=/var/log/mysql
+    mysql_upgradedir=/var/lib/mysql-upgrade
+
+    # first things first, if the following symlink exists, it is a preserved
+    # copy the old data dir from a mysql upgrade that would have otherwise
+    # been replaced by an empty mysql dir.  this should restore it.
+    for dir in DATADIR LOGDIR; do
+        if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi
+        savelink="$mysql_upgradedir/$dir.link"
+        if [ -L "$savelink" ]; then
+            # If the targetdir was a symlink before we upgraded it is supposed
+            # to be either still be present or not existing anymore now.
+            if [ -L "$targetdir" ]; then
+                rm "$savelink"
+            elif [ ! -d "$targetdir" ]; then
+                mv "$savelink" "$targetdir"
+            else
+                # this should never even happen, but just in case...
+                mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
+                echo "this is very strange!  see $mysql_tmp/README..." >&2
+                mv "$targetdir" "$mysql_tmp"
+                cat << EOF > "$mysql_tmp/README"
+
+if you're reading this, it's most likely because you had replaced /var/lib/mysql
+with a symlink, then upgraded to a new version of mysql, and then dpkg
+removed your symlink (see #182747 and others).  the mysql packages noticed
+that this happened, and as a workaround have restored it.  however, because
+/var/lib/mysql seems to have been re-created in the meantime, and because
+we don't want to rm -rf something we don't know as much about, we're going
+to leave this unexpected directory here.  if your database looks normal,
+and this is not a symlink to your database, you should be able to blow
+this all away.
+
+EOF
+            fi
+        fi
+	rmdir $mysql_upgradedir 2>/dev/null || true
+    done
+    
+    # Ensure the existence and right permissions for the database and
+    # log files.
+    if [ ! -d "$mysql_statedir"       -a ! -L "$mysql_statedir"       ]; then mkdir "$mysql_statedir"; fi
+    if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi
+    if [ ! -d "$mysql_newlogdir"      -a ! -L "$mysql_newlogdir"      ]; then mkdir "$mysql_newlogdir"; fi
+    # When creating an ext3 jounal on an already mounted filesystem like e.g.
+    # /var/lib/mysql, you get a .journal file that is not modifyable by chown.
+    # The mysql_datadir must not be writable by the mysql user under any
+    # circumstances as it contains scripts that are executed by root.
+    set +e
+    chown -R 0:0 $mysql_datadir
+    chown -R mysql $mysql_statedir
+    chown -R mysql $mysql_rundir
+    chown -R mysql:adm $mysql_newlogdir;	chmod 2750 $mysql_newlogdir;
+    for i in log err; do
+      touch             $mysql_logdir/mysql.$i
+      chown mysql:adm   $mysql_logdir/mysql.$i
+      chmod 0640        $mysql_logdir/mysql.$i
+    done
+    set -e
+
+    # This is important to avoid dataloss when there is a removed
+    # mysql-server version from Woody lying around which used the same
+    # data directory and then somewhen gets purged by the admin.
+    db_set mysql-server/postrm_remove_database false || true
+
+    # So that mysql-server (4.0) can check if it's safe to install.
+    touch $mysql_statedir/debian-5.0.flag
+
+    # On dist-upgrades, we ensure that the old_password setting is updated
+    # before passwords are changed. Except for that my.cnf is taboo!
+    db_get mysql-server-5.0/need_sarge_compat_done || true
+    if [ "$RET" = "false" ]; then
+ 	db_get mysql-server-5.0/need_sarge_compat
+	echo -e "# created by debconf\n[mysqld]\nold_passwords = $RET" > /etc/mysql/conf.d/old_passwords.cnf
+    fi
+    db_set mysql-server-5.0/need_sarge_compat_done true
+
+    # initiate databases. Output is not allowed by debconf :-(
+    # Debian: beware of the bashisms... 
+    # Debian: can safely run on upgrades with existing databases 
+    set +e
+    /bin/bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER
+    if [ "$?" != "0" ]; then
+      echo "ATTENTION: An error has occured. More info is in the syslog!"
+    fi
+    set -e
+    
+    ## On every reconfiguration the maintenance user is recreated.
+    #
+    # - It is easier to regenerate the password every time but as people
+    #   use fancy rsync scripts and file alteration monitors, the existing
+    #   password is used and existing files not touched.
+    # - The mysqld statement is like that in mysql_install_db because the
+    #   server is not already running. This has some implications:
+    # 	- The amount of newlines and semicolons in the query is important!
+    #   - GRANT is not possible with --skipt-grant-tables and "INSERT
+    #     (user,host..) VALUES" is not --ansi compliant
+    # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo.
+    # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv
+    #   may not be present as old Woody 3.23 databases did not have it and the
+    #   admin might not already have run mysql_upgrade which adds them.
+    #   As the binlog cron scripts to need at least the Super_priv, I do first
+    #   the old query which always succeeds and then the new which may or may not.
+
+    # recreate the credentials file if not present or without mysql_upgrade stanza
+    dc=$mysql_cfgdir/debian.cnf; 
+    if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then
+	pass="`sed -n 's/^[ 	]*password *= *// p' $dc | head -n 1`"
+    else
+	pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
+        if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
+        cat /dev/null > $dc
+        echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
+        echo "[client]"                                                    >>$dc
+        echo "host     = localhost"                                        >>$dc
+        echo "user     = debian-sys-maint"                                 >>$dc
+        echo "password = $pass"                                            >>$dc
+        echo "socket   = $mysql_rundir/mysqld.sock"                        >>$dc
+        echo "[mysql_upgrade]"                                             >>$dc
+        echo "user     = debian-sys-maint"                                 >>$dc
+        echo "password = $pass"                                            >>$dc
+        echo "socket   = $mysql_rundir/mysqld.sock"                        >>$dc
+        echo "basedir  = /usr"                                             >>$dc
+    fi
+    # If this dir chmod go+w then the admin did it. But this file should not.
+    chown 0:0 $dc
+    chmod 0600 $dc
+
+    # update privilege and timezone tables
+    password_column_fix_query=`/bin/echo -e \
+	"USE mysql\n" \
+	"ALTER TABLE user CHANGE password Password varchar(41) collate utf8_bin NOT NULL default ''"`;
+    replace_query=`/bin/echo -e \
+	"USE mysql\n" \
+	"REPLACE INTO user SET " \
+	"  host='localhost', user='debian-sys-maint', password=password('$pass'), " \
+	"  Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
+	"  Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
+	"  Process_priv='Y',  File_priv='Y', Grant_priv='Y', References_priv='Y', " \
+	"  Index_priv='Y', Alter_priv='Y' __EXTRA_PRIVS__"`;
+    extra_privs=`/bin/echo -e \
+	", Show_db_priv='Y' " \
+	", Super_priv='Y' " \
+	", Create_tmp_table_priv='Y' " \
+	", Lock_tables_priv='Y' " \
+	", Execute_priv='Y' " \
+	", Repl_slave_priv='Y' " \
+	", Repl_client_priv='Y' "`;
+
+    # Upgrade password column format before the root password gets set.
+    echo "$password_column_fix_query"                             | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
+
+    db_get mysql-server/root_password && rootpw="$RET"
+    if ! set_mysql_rootpw; then
+    	password_error="yes"
+    fi
+
+    echo "$replace_query" | sed "s/__EXTRA_PRIVS__//"             | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
+    set +e
+    echo "$replace_query" | sed "s/__EXTRA_PRIVS__/$extra_privs/" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
+    set -e
+    mysql_tzinfo_to_sql /usr/share/zoneinfo/ 2>&1 | egrep -v 'Skipping it.$' | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
+
+    # The Sarge package "mysql-server" which used to include the mysqld daemon
+    # may still be in unselected-configured state (i.e. after a remove but not
+    # purge) in which case its now obsolete cronscript has to be moved away.
+    for i in /etc/cron.daily/mysql-server /etc/cron.daily/mysql-server-41 /etc/mysql/debian-log-rotate.conf; do
+      if [ -f $i ]; then mv $i $i.dpkg-old; fi 
+    done
+  ;;
+
+  abort-upgrade|abort-remove|abort-configure)
+  ;;
+
+  *)
+    echo "postinst called with unknown argument '$1'" 1>&2
+    exit 1
+  ;;
+esac
+
+#DEBHELPER#
+
+# here we check to see if we can connect as root without a password
+# this should catch upgrades from previous verisons where the root
+# password wasn't set.  if there is a password, or if the connection
+# fails for any other reason, nothing happens.
+if [ "$1" = "configure" ]; then
+	if test_mysql_access; then
+		db_input medium mysql-server/root_password || true
+		db_go
+		db_get mysql-server/root_password && rootpw="$RET"
+
+		if ! set_mysql_rootpw "online"; then
+			password_error="yes"
+		fi
+	fi
+
+	if [ "$password_error" = "yes" ]; then
+		db_input high mysql-server/error_setting_password || true
+		db_go
+	fi
+
+fi
+
+db_stop # in case invoke failes
+
+exit 0

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postrm
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postrm	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.postrm	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,97 @@
+#!/bin/bash -e
+
+# It is possible that Debconf has already been removed, too.
+if [ -f /usr/share/debconf/confmodule ]; then
+  . /usr/share/debconf/confmodule
+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 }
+
+MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+
+# Try to stop the server in a sane way. If it does not success let the admin
+# do it himself. No database directories should be removed while the server
+# is running!
+stop_server() {
+  set +e
+  if [ -x /usr/sbin/invoke-rc.d ]; then
+    invoke-rc.d mysql stop
+  else
+    /etc/init.d/mysql stop
+  fi
+  errno=$?
+  set -e
+
+  if [ "$?" != 0 ]; then
+    echo "Trying to stop the MySQL server resulted in exitcode $?." 1>&2
+    echo "Stop it yourself and try again!" 1>&2
+    exit 1
+  fi
+}
+
+case "$1" in
+  purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
+      stop_server
+      sleep 2
+    fi
+  ;;
+  *)
+    echo "postrm called with unknown argument '$1'" 1>&2
+    exit 1
+  ;;
+esac
+
+# Remove Debconf generated config files to allow clean upgrades to 5.1.
+rm -f /etc/mysql/conf.d/old_passwords.cnf
+
+#
+# - Do NOT purge logs or data if another mysql-sever* package is installed (#307473)
+# - Remove the mysql user only after all his owned files are purged.
+#   
+if [ "$1" = "purge" -a ! \( -x /usr/sbin/mysqld -o -L /usr/sbin/mysqld \) ]; then
+  # we remove the mysql user only after all his owned files are purged
+  rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
+  rm -rf /var/log/mysql
+
+  db_input high mysql-server-5.0/postrm_remove_databases || true
+  db_go || true
+  db_get mysql-server-5.0/postrm_remove_databases || true
+  if [ "$RET" = "true" ]; then
+    # never remove the debian.cnf when the databases are still existing
+    # else we ran into big trouble on the next install!
+    rm -f /etc/mysql/debian.cnf
+    rm -rf /var/lib/mysql
+    rm -rf /var/run/mysqld
+    userdel mysql || true
+  fi
+
+  # (normally) Automatically added by dh_installinit
+  if [ "$1" = "purge" ] ; then
+        update-rc.d mysql remove >/dev/null || exit 0
+  fi
+  # (normally) End automatically added section
+fi
+
+# (normally) Automatically added by dh_installdebconf
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+        . /usr/share/debconf/confmodule
+        db_purge
+fi
+# (normally) End automatically added section
+
+# (normally) Automatically added by dh_installinit
+if [ "$1" = "purge" ] ; then
+        update-rc.d mysql-ndb-mgm remove >/dev/null || exit 0
+fi
+# (normally) End automatically added section
+# (normally) Automatically added by dh_installinit
+if [ "$1" = "purge" ] ; then
+        update-rc.d mysql-ndb remove >/dev/null || exit 0
+fi
+# (normally) End automatically added section
+
+# no DEBHELPER here, "update-rc.d remove" fails if mysql-server-5.0 is installed
+
+exit 0

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.preinst
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.preinst	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.preinst	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,174 @@
+#!/bin/bash -e
+#
+# summary of how this script can be called:
+#        * <new-preinst> install
+#        * <new-preinst> install <old-version>
+#        * <new-preinst> upgrade <old-version>
+#        * <old-preinst> abort-upgrade <new-version>
+#
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
+MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
+DATADIR=/var/lib/mysql
+LOGDIR=/var/log/mysql
+UPGRADEDIR=/var/lib/mysql-upgrade
+
+# Try to stop the server in a sane way. If it does not success let the admin
+# do it himself. No database directories should be removed while the server
+# is running! Another mysqld in e.g. a different chroot is fine for us.
+stop_server() {
+    if [ ! -x /etc/init.d/mysql ]; then return; fi
+
+    set +e
+    if [ -x /usr/sbin/invoke-rc.d ]; then
+      cmd="invoke-rc.d mysql stop"
+    else
+      cmd="/etc/init.d/mysql stop"
+    fi
+    $cmd
+    errno=$?
+    set -e
+   
+    # 0=ok, 100=no init script (fresh install)
+    if [ "$errno" != 0 -a "$errno" != 100 ]; then
+      echo "${cmd/ */} returned $errno" 1>&2
+      echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
+      echo "Stop it yourself and try again!" 1>&2
+      db_stop  	
+      exit 1
+    fi
+}
+
+################################ main() ##########################
+
+this_version=5.0
+
+# Check kernel version
+if dpkg --compare-versions `uname -r` lt 2.6; then
+  /bin/echo -e "\nPROBLEM: MySQL-5.x is currently incompatible with kernel 2.4. Aborting.";
+  /bin/echo -e "See http://bugs.debian.org/416841 for more information.\n"
+  exit 1
+fi
+
+show_downgrade_warning=0
+for i in `ls $DATADIR/debian-*.flag 2>/dev/null`; do
+  found_version=`echo $i | sed 's/.*debian-\([0-9\.]\+\).flag/\1/'`
+  if dpkg --compare-versions "$this_version" '<<' "$found_version"; then
+    show_downgrade_warning=1
+    break;
+  fi
+done
+if [ "$show_downgrade_warning" = 1 ]; then
+  db_fset mysql-server-$this_version/really_downgrade seen false || true
+  db_input medium mysql-server-$this_version/really_downgrade || true
+  db_go
+  db_get mysql-server-$this_version/really_downgrade || true
+  if [ "$RET" = "true" ]; then
+    rm -f $DATADIR/debian-*.flag
+    touch $DATADIR/debian-$this_version.flag
+  else
+    echo "Aborting downgrade from (at least) $found_version to $this_version." 1>&2
+    db_stop
+    exit 1
+  fi
+fi
+
+# to be sure
+stop_server
+
+# If we use NIS then errors should be tolerated. It's up to the
+# user to ensure that the mysql user is correctly setup.
+# 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
+  set +e
+fi
+
+#
+# Now we have to ensure the following state:
+# /etc/passwd: mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false
+# /etc/group:  mysql:x:101:
+# 
+# Sadly there could any state be present on the system so we have to
+# modify everything carefully i.e. not doing a chown before creating
+# the user etc...
+#
+
+# creating mysql group if he isn't already there
+if ! getent group mysql >/dev/null; then
+ 	# Adding system group: mysql.
+	addgroup --system mysql >/dev/null
+fi
+
+# creating mysql user if he isn't already there
+if ! getent passwd mysql >/dev/null; then
+	# Adding system user: mysql.
+	adduser \
+	  --system \
+	  --disabled-login \
+	  --ingroup mysql \
+	  --home $DATADIR \
+	  --gecos "MySQL Server" \
+	  --shell /bin/false \
+	  mysql  >/dev/null
+fi
+
+# end of NIS tolerance zone
+set -e
+
+# if there's a symlink, let's store where it's pointing, because otherwise
+# it's going to be lost in some situations
+for dir in DATADIR LOGDIR; do
+    checkdir=`eval echo "$"$dir`
+    if [ -L "$checkdir" ]; then
+	mkdir -p "$UPGRADEDIR"
+	cp -d "$checkdir" "$UPGRADEDIR/$dir.link"
+    fi
+done
+
+# creating mysql home directory
+if [ ! -d $DATADIR -a ! -L $DATADIR ]; then
+ 	mkdir $DATADIR
+fi
+
+# checking disc space
+if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then
+  echo "ERROR: There's not enough space in $DATADIR/" 1>&2
+  db_stop
+  exit 1
+fi
+
+# Since the home directory was created before putting the user into
+# the mysql group and moreover we cannot guarantee that the 
+# permissions were correctly *before* calling this script, we fix them now.
+# In case we use NIS and no mysql user is present then this script should
+# better fail now than later..
+# The "set +e" is necessary as e.g. a ".journal" of a ext3 partition is
+# not chgrp'able (#318435).
+set +e
+chown mysql:mysql $DATADIR
+find $DATADIR -follow -not -group mysql -print0 2>/dev/null \
+  | xargs -0 --no-run-if-empty chgrp mysql
+set -e
+
+# Some files below /etc/ were possibly in the mysql-server-4.1/sarge package
+# before. They get overwritten by current ones to avoid unnecessary dpkg questions.
+while read md5 file; do
+  if [ "`md5sum $file 2>/dev/null`" = "$md5  $file" ]; then
+    cp /usr/share/mysql-common/internal-use-only/`echo $file | sed 's°/°_°g'` $file
+  fi
+done <<EOT
+6691f2fdc5c6d27ff0260eb79813e1bc  /etc/init.d/mysql
+b53b9552d44661361d39157c3c7c51d3  /etc/logrotate.d/mysql-server
+57f3e58f72582ca55100dc1ba0f1a8ae  /etc/mysql/debian-start
+EOT
+
+db_stop
+
+#DEBHELPER#
+
+exit 0

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.prerm
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.prerm	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.prerm	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+. /usr/share/debconf/confmodule
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+#DEBHELPER#

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.templates
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.templates	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server-5.0.templates	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,102 @@
+# These templates have been reviewed by the debian-l10n-english
+# team
+#
+# If modifications/additions/rewording are needed, please ask
+# for an advice to debian-l10n-english at lists.debian.org
+#
+# Even minor modifications require translation updates and such
+# changes should be coordinated with translators and reviewers.
+
+Template: mysql-server-5.0/really_downgrade
+Type: boolean
+Default: false
+_Description: Really proceed with downgrade?
+ A file named /var/lib/mysql/debian-*.flag exists on this system.
+ .
+ Such file is an indication that a mysql-server package with a higher
+ version has been installed earlier.
+ .
+ There is no guarantee that the version you're currently installing
+ will be able to use the current databases.
+
+Template: mysql-server-5.0/nis_warning
+Type: note
+#flag:translate!:3,5
+_Description: Important note for NIS/YP users
+ To use MySQL, the following entries for users and groups should be added
+ to the system:
+ .
+  /etc/passwd   : mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false
+  /etc/group    : mysql:x:101:
+ .
+ You should also check the permissions and the owner of the
+ /var/lib/mysql directory:
+ .
+  /var/lib/mysql: drwxr-xr-x   mysql    mysql
+
+Template: mysql-server-5.0/postrm_remove_databases
+Type: boolean
+Default: false
+_Description: Remove all MySQL databases?
+ The /var/lib/mysql directory which contains the MySQL databases is about
+ to be removed.
+ .
+ If you're removing the MySQL package in order to later install a more
+ recent version or if a different mysql-server package is already
+ using it, the data should be kept.
+
+Template: mysql-server-5.0/start_on_boot
+Type: boolean
+Default: true
+_Description: Start the MySQL server on boot?
+ The MySQL server can be launched automatically at boot time or manually
+ with the '/etc/init.d/mysql start' command.
+
+Template: mysql-server/root_password
+Type: password
+_Description: New password for the MySQL "root" user:
+ While not mandatory, it is highly recommended that you set a password
+ for the MySQL administrative "root" user.
+ .
+ If that field is left blank, the password will not be changed.
+
+Template: mysql-server/root_password_again
+Type: password
+_Description: Repeat password for the MySQL "root" user:
+
+Template: mysql-server/error_setting_password
+Type: error
+_Description: Unable to set password for the MySQL "root" user
+ An error occurred while setting the password for the MySQL
+ administrative user. This may have happened because the account
+ already has a password, or because of a communication problem with
+ the MySQL server.
+ .
+ You should check the account's password after the package installation.
+ .
+ Please read the /usr/share/doc/mysql-server-5.0/README.Debian file
+ for more information.
+
+Template: mysql-server/password_mismatch
+Type: error
+_Description: Password input error
+ The two passwords you entered were not the same. Please try again.
+
+Template: mysql-server-5.0/need_sarge_compat
+Type: boolean
+Default: false
+_Description: Support MySQL connections from hosts running Debian "sarge" or older?
+ In old versions of MySQL clients on Debian, passwords were not stored
+ securely. This has been improved since then, however clients (such as PHP)
+ from hosts running Debian 3.1 Sarge will not be able to connect to
+ recent accounts or accounts whose password have been changed.
+ .
+ Please read the /usr/share/doc/mysql-server-5.0/README.Debian file
+ for more information.
+
+Template: mysql-server-5.0/need_sarge_compat_done
+Type: boolean
+Default: false
+Description: for internal use
+ Only internally used.
+

Added: mysql-dfsg-5.0/branches/unstable/debian/mysql-server.preinst
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/mysql-server.preinst	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/mysql-server.preinst	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,198 @@
+#!/bin/bash -e
+#
+# summary of how this script can be called:
+#        * <new-preinst> install
+#        * <new-preinst> install <old-version>
+#        * <new-preinst> upgrade <old-version>
+#        * <old-preinst> abort-upgrade <new-version>
+#
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
+
+export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
+
+# Try to stop the server in a sane way. If it does not success let the admin
+# do it himself. No database directories should be removed while the server
+# is running! Another mysqld in e.g. a different chroot is fine for us.
+stop_server() {
+    if [ ! -x /etc/init.d/mysql ]; then return; fi
+
+    set +e
+    if [ -x /usr/sbin/invoke-rc.d ]; then
+      cmd="invoke-rc.d mysql stop"
+    else
+      cmd="/etc/init.d/mysql stop"
+    fi
+    $cmd
+    errno=$?
+    set -e
+   
+    # 0=ok, 100=no init script (fresh install)
+    if [ "$errno" != 0 -a "$errno" != 100 ]; then
+      echo "${cmd/ */} returned $errno" 1>&2
+      echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
+      echo "Stop it yourself and try again!" 1>&2
+      exit 1
+    fi
+}
+
+##### here's a bunch of helper functions for converting database formats ######
+
+cvt_get_param(){
+	/usr/sbin/mysqld --print-defaults \
+		| tr " " "\n" \
+		| grep -- "--$1" \
+		| tail -n 1 \
+		| cut -d= -f2
+}
+
+cvt_setup_stuff(){
+	mytmp=`mktemp -d -t mysql-ISAM-convert.XXXXXX`
+	cvt_log="$mytmp/conversion.log"
+	if [ ! -d "$mytmp" ]; then
+		echo "can't create temporary directory, oh well." >&2
+		exit 1
+	fi
+
+	chgrp mysql $mytmp
+	chmod g+rwx $mytmp
+	cvt_socket=${mytmp}/mysql.sock
+
+	cvt_mysqld="mysqld --skip-grant-tables --skip-networking --socket $cvt_socket"
+	cvt_mysql="mysql --socket $cvt_socket"
+	cvt_mysqladmin="mysqladmin --socket $cvt_socket"
+}
+
+cvt_get_databases(){
+	echo fetching database list ... >&2
+	$cvt_mysql -e 'show databases' | sed -n -e '2,$p'
+}
+
+cvt_get_tables(){
+	echo querying tables in $1 ... >&2
+	$cvt_mysql $1 -e 'show table status' | sed -n -e '2,$p' | \
+		cut -f 1,2 | grep -w 'ISAM$' | cut -f 1
+}
+
+cvt_convert_table(){
+	echo converting $1.$2 ... >&2
+	$cvt_mysql $1 -e "alter table $2 type=MyISAM"
+}
+
+cvt_wait_for_server(){
+	local count
+	echo -n waiting for server startup.. >&2
+	while ! $cvt_mysql </dev/null >/dev/null 2>&1; do
+		echo -n . >&2
+		sleep 1
+		count=".$count"
+		if [ -f $mytmp/mysql.done ]; then
+			echo "sorry... looks like the server crashed :(" >&2
+			return 1
+		elif [ "$count" = "...................." ]; then
+			echo "sorry... looks like the server didn't start :(" >&2
+			return 1
+		fi
+	done
+	echo ok. >&2
+}
+
+cvt_wait_for_exit(){
+	local count
+	echo -n waiting for server shutdown.. >&2
+	while [ ! -f $mytmp/mysql.done ]; do
+		echo -n . >&2
+		sleep 1
+		count=".$count"
+		if [ "$count" = "...................." ]; then
+			echo "hrm... guess it never started?" >&2
+			return 0
+		fi
+	done
+	echo ok. >&2
+}
+
+cvt_cleanup(){
+	local mysql_kids
+	rm -rf $mytmp
+	# kill any mysqld child processes left over.  there *shouldn't* be any,
+	# but let's not take chances with that
+	mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
+	if [ "$mysql_kids" ]; then
+		echo "strange, some mysql processes left around. killing them now." >&2
+		kill $mysql_kids
+		sleep 10
+		mysql_kids=`ps o 'pid command' --ppid $$ | grep -E '^[[:digit:]]+ mysqld ' | cut -d' ' -f1`
+		if [ "$mysql_kids" ]; then
+			echo "okay, they're really not getting the hint..." >&2
+			kill -9 $mysql_kids
+		fi
+	fi
+}
+
+################################ main() ##########################
+
+# Check kernel version
+if dpkg --compare-versions `uname -r` lt 2.6; then
+  /bin/echo -e "\nPROBLEM: MySQL-5.x is currently incompatible with kernel 2.4. Aborting.";
+  /bin/echo -e "See http://bugs.debian.org/416841 for more information.\n"
+  exit 1
+fi
+
+# to be sure
+stop_server
+
+# test if upgrading from non conffile state
+if [ "$1" = "upgrade" ] && [ -x /usr/sbin/mysqld ]; then
+	cvt_datadir=`cvt_get_param datadir`
+	# test for ISAM tables, which we must convert NOW
+	if [ -n "`find $cvt_datadir -name '*.ISM' 2>/dev/null`" ]; then
+		set +e
+		cat << EOF >&2
+----------------------------------------
+WARNING WARNING WARNING
+----------------------------------------
+
+It has been detected that are are using ISAM format on some of your
+mysql database tables.  This format has been deprecated and no longer
+supported.  to prevent these databases from essentially disappearing,
+an attempt at format conversion will now be made.  please check after
+your upgrade that all tables are present and accounted for.
+
+apologies for the noise, but we thought you'd appreciate it :)
+
+----------------------------------------
+WARNING WARNING WARNING
+----------------------------------------
+EOF
+		cvt_setup_stuff
+		($cvt_mysqld >$cvt_log 2>&1; touch $mytmp/mysql.done ) &
+
+		if cvt_wait_for_server; then
+			dbs=`cvt_get_databases`
+			for db in $dbs; do
+				tables=`cvt_get_tables $db`
+				for tbl in $tables; do
+					cvt_convert_table $db $tbl
+				done
+			done
+		else
+			cvt_error="yes"
+		fi
+
+		echo shutting down server... >&2
+		$cvt_mysqladmin shutdown
+		cvt_wait_for_exit
+		echo "all done!" >&2
+		if [ ! "$cvt_error" = "yes" ]; then
+			cvt_cleanup
+		else
+			echo "you might want to look in $mytmp..." >&2
+		fi
+
+		set -e
+	fi
+fi
+
+exit 0

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/00list
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/00list	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/00list	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,12 @@
+01_MAKEFILES__Docs_Images_Makefile.in.dpatch
+01_MAKEFILES__Docs_Makefile.in.dpatch
+25_mysys__default.c.dpatch
+33_scripts__mysql_create_system_tables__no_test.dpatch
+37_scripts__mysqld_safe.sh__syslog.dpatch
+38_scripts__mysqld_safe.sh__signals.dpatch
+41_scripts__mysql_install_db.sh__no_test.dpatch
+44_scripts__mysql_config__libs.dpatch
+45_warn-CLI-passwords.dpatch
+60_disabled_tests.dpatch
+86_PATH_MAX.dpatch
+89_ndb__staticlib.dpatch

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Images_Makefile.in.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,776 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_MAKEFILES__Docs_Makefile.in.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Creates Docs/Makefile.in
+
+ at DPATCH@
+
+--- old/Docs/Images/Makefile.in	2005-03-01 02:08:01.877429040 +0100
++++ new/Docs/Images/Makefile.in	2005-02-28 21:21:24.000000000 +0100
+@@ -0,0 +1,765 @@
++# Makefile.in generated by automake 1.7.9 from Makefile.am.
++# @configure_input@
++
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
++# Free Software Foundation, Inc.
++# This Makefile.in is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++ at SET_MAKE@
++
++# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
++# 
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++# 
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++# 
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++
++# Process this file with automake to create Makefile.in
++
++srcdir = @srcdir@
++top_srcdir = @top_srcdir@
++VPATH = @srcdir@
++pkgdatadir = $(datadir)/@PACKAGE@
++pkglibdir = $(libdir)/@PACKAGE@
++pkgincludedir = $(includedir)/@PACKAGE@
++top_builddir = .
++
++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
++INSTALL = @INSTALL@
++install_sh_DATA = $(install_sh) -c -m 644
++install_sh_PROGRAM = $(install_sh) -c
++install_sh_SCRIPT = $(install_sh) -c
++INSTALL_HEADER = $(INSTALL_DATA)
++transform = $(program_transform_name)
++NORMAL_INSTALL = :
++PRE_INSTALL = :
++POST_INSTALL = :
++NORMAL_UNINSTALL = :
++PRE_UNINSTALL = :
++POST_UNINSTALL = :
++build_triplet = @build@
++host_triplet = @host@
++target_triplet = @target@
++ACLOCAL = @ACLOCAL@
++ALLOCA = @ALLOCA@
++AMDEP_FALSE = @AMDEP_FALSE@
++AMDEP_TRUE = @AMDEP_TRUE@
++AMTAR = @AMTAR@
++AR = @AR@
++AS = @AS@
++ASSEMBLER_FALSE = @ASSEMBLER_FALSE@
++ASSEMBLER_TRUE = @ASSEMBLER_TRUE@
++ASSEMBLER_sparc32_FALSE = @ASSEMBLER_sparc32_FALSE@
++ASSEMBLER_sparc32_TRUE = @ASSEMBLER_sparc32_TRUE@
++ASSEMBLER_sparc64_FALSE = @ASSEMBLER_sparc64_FALSE@
++ASSEMBLER_sparc64_TRUE = @ASSEMBLER_sparc64_TRUE@
++ASSEMBLER_x86_FALSE = @ASSEMBLER_x86_FALSE@
++ASSEMBLER_x86_TRUE = @ASSEMBLER_x86_TRUE@
++AUTOCONF = @AUTOCONF@
++AUTOHEADER = @AUTOHEADER@
++AUTOMAKE = @AUTOMAKE@
++AVAILABLE_LANGUAGES = @AVAILABLE_LANGUAGES@
++AVAILABLE_LANGUAGES_ERRORS = @AVAILABLE_LANGUAGES_ERRORS@
++AWK = @AWK@
++CC = @CC@
++CCAS = @CCAS@
++CCASFLAGS = @CCASFLAGS@
++CCDEPMODE = @CCDEPMODE@
++CC_VERSION = @CC_VERSION@
++CFLAGS = @CFLAGS@
++CHARSETS_NEED_SOURCE = @CHARSETS_NEED_SOURCE@
++CHARSET_OBJS = @CHARSET_OBJS@
++CHARSET_SRCS = @CHARSET_SRCS@
++CHECK_PID = @CHECK_PID@
++CHMOD = @CHMOD@
++CLIENT_EXTRA_LDFLAGS = @CLIENT_EXTRA_LDFLAGS@
++CLIENT_LIBS = @CLIENT_LIBS@
++CMP = @CMP@
++COMPILATION_COMMENT = @COMPILATION_COMMENT@
++COMPILE_PSTACK_FALSE = @COMPILE_PSTACK_FALSE@
++COMPILE_PSTACK_TRUE = @COMPILE_PSTACK_TRUE@
++CONF_COMMAND = @CONF_COMMAND@
++CP = @CP@
++CPP = @CPP@
++CPPFLAGS = @CPPFLAGS@
++CXX = @CXX@
++CXXCPP = @CXXCPP@
++CXXDEPMODE = @CXXDEPMODE@
++CXXFLAGS = @CXXFLAGS@
++CXXLDFLAGS = @CXXLDFLAGS@
++CXX_VERSION = @CXX_VERSION@
++CYGPATH_W = @CYGPATH_W@
++DEFS = @DEFS@
++DEPDIR = @DEPDIR@
++DOT_FRM_VERSION = @DOT_FRM_VERSION@
++DVIS = @DVIS@
++ECHO = @ECHO@
++ECHO_C = @ECHO_C@
++ECHO_N = @ECHO_N@
++ECHO_T = @ECHO_T@
++EGREP = @EGREP@
++EXEEXT = @EXEEXT@
++F77 = @F77@
++FFLAGS = @FFLAGS@
++FIND_PROC = @FIND_PROC@
++GETCONF = @GETCONF@
++GXX = @GXX@
++HAVE_NETWARE_FALSE = @HAVE_NETWARE_FALSE@
++HAVE_NETWARE_TRUE = @HAVE_NETWARE_TRUE@
++HOSTNAME = @HOSTNAME@
++INSTALL_DATA = @INSTALL_DATA@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++IS_LINUX = @IS_LINUX@
++KILL = @KILL@
++LD = @LD@
++LDFLAGS = @LDFLAGS@
++LIBDL = @LIBDL@
++LIBOBJS = @LIBOBJS@
++LIBS = @LIBS@
++LIBTOOL = @LIBTOOL@
++LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
++LM_CFLAGS = @LM_CFLAGS@
++LN = @LN@
++LN_CP_F = @LN_CP_F@
++LN_S = @LN_S@
++LOCAL_FALSE = @LOCAL_FALSE@
++LOCAL_TRUE = @LOCAL_TRUE@
++LTLIBOBJS = @LTLIBOBJS@
++MACHINE_TYPE = @MACHINE_TYPE@
++MAINT = @MAINT@
++MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
++MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
++MAKEINFO = @MAKEINFO@
++MAKE_BINARY_DISTRIBUTION_OPTIONS = @MAKE_BINARY_DISTRIBUTION_OPTIONS@
++MAKE_SHELL = @MAKE_SHELL@
++MT_INCLUDES = @MT_INCLUDES@
++MT_LD_ADD = @MT_LD_ADD@
++MV = @MV@
++MYSQLD_DEFAULT_SWITCHES = @MYSQLD_DEFAULT_SWITCHES@
++MYSQLD_EXTRA_LDFLAGS = @MYSQLD_EXTRA_LDFLAGS@
++MYSQLD_USER = @MYSQLD_USER@
++MYSQL_BASE_VERSION = @MYSQL_BASE_VERSION@
++MYSQL_NO_DASH_VERSION = @MYSQL_NO_DASH_VERSION@
++MYSQL_SERVER_SUFFIX = @MYSQL_SERVER_SUFFIX@
++MYSQL_TCP_PORT = @MYSQL_TCP_PORT@
++MYSQL_TCP_PORT_DEFAULT = @MYSQL_TCP_PORT_DEFAULT@
++MYSQL_UNIX_ADDR = @MYSQL_UNIX_ADDR@
++MYSQL_VERSION_ID = @MYSQL_VERSION_ID@
++NOINST_LDFLAGS = @NOINST_LDFLAGS@
++OBJEXT = @OBJEXT@
++PACKAGE = @PACKAGE@
++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_STRING = @PACKAGE_STRING@
++PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_VERSION = @PACKAGE_VERSION@
++PATH_SEPARATOR = @PATH_SEPARATOR@
++PDFMANUAL = @PDFMANUAL@
++PERL = @PERL@
++PERL5 = @PERL5@
++PROTOCOL_VERSION = @PROTOCOL_VERSION@
++PS = @PS@
++RANLIB = @RANLIB@
++RM = @RM@
++SAVE_ASFLAGS = @SAVE_ASFLAGS@
++SAVE_CFLAGS = @SAVE_CFLAGS@
++SAVE_CXXFLAGS = @SAVE_CXXFLAGS@
++SAVE_CXXLDFLAGS = @SAVE_CXXLDFLAGS@
++SAVE_LDFLAGS = @SAVE_LDFLAGS@
++SED = @SED@
++SET_MAKE = @SET_MAKE@
++SHARED_LIB_VERSION = @SHARED_LIB_VERSION@
++SHELL = @SHELL@
++STRIP = @STRIP@
++SYSTEM_TYPE = @SYSTEM_TYPE@
++TAR = @TAR@
++TERMCAP_LIB = @TERMCAP_LIB@
++THREAD_LOBJECTS = @THREAD_LOBJECTS@
++THREAD_LPROGRAMS = @THREAD_LPROGRAMS@
++VERSION = @VERSION@
++WRAPLIBS = @WRAPLIBS@
++YACC = @YACC@
++ac_ct_AR = @ac_ct_AR@
++ac_ct_CC = @ac_ct_CC@
++ac_ct_CXX = @ac_ct_CXX@
++ac_ct_F77 = @ac_ct_F77@
++ac_ct_GETCONF = @ac_ct_GETCONF@
++ac_ct_RANLIB = @ac_ct_RANLIB@
++ac_ct_STRIP = @ac_ct_STRIP@
++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
++am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
++am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
++am__include = @am__include@
++am__leading_dot = @am__leading_dot@
++am__quote = @am__quote@
++bdb_includes = @bdb_includes@
++bdb_libs = @bdb_libs@
++bdb_libs_with_path = @bdb_libs_with_path@
++bench_dirs = @bench_dirs@
++bindir = @bindir@
++build = @build@
++build_alias = @build_alias@
++build_cpu = @build_cpu@
++build_os = @build_os@
++build_vendor = @build_vendor@
++datadir = @datadir@
++default_charset = @default_charset@
++docs_dirs = @docs_dirs@
++exec_prefix = @exec_prefix@
++host = @host@
++host_alias = @host_alias@
++host_cpu = @host_cpu@
++host_os = @host_os@
++host_vendor = @host_vendor@
++includedir = @includedir@
++infodir = @infodir@
++innodb_includes = @innodb_includes@
++innodb_libs = @innodb_libs@
++innodb_system_libs = @innodb_system_libs@
++install_sh = @install_sh@
++isam_libs = @isam_libs@
++libdir = @libdir@
++libexecdir = @libexecdir@
++libmysqld_dirs = @libmysqld_dirs@
++linked_client_targets = @linked_client_targets@
++linked_netware_sources = @linked_netware_sources@
++localstatedir = @localstatedir@
++man_dirs = @man_dirs@
++mandir = @mandir@
++netware_dir = @netware_dir@
++oldincludedir = @oldincludedir@
++openssl_includes = @openssl_includes@
++openssl_libs = @openssl_libs@
++orbit_idl = @orbit_idl@
++orbit_includes = @orbit_includes@
++orbit_libs = @orbit_libs@
++prefix = @prefix@
++program_transform_name = @program_transform_name@
++pstack_dirs = @pstack_dirs@
++pstack_libs = @pstack_libs@
++readline_dir = @readline_dir@
++readline_link = @readline_link@
++sbindir = @sbindir@
++server_scripts = @server_scripts@
++sharedstatedir = @sharedstatedir@
++sql_client_dirs = @sql_client_dirs@
++sql_server_dirs = @sql_server_dirs@
++sysconfdir = @sysconfdir@
++target = @target@
++target_alias = @target_alias@
++target_cpu = @target_cpu@
++target_os = @target_os@
++target_vendor = @target_vendor@
++thread_dirs = @thread_dirs@
++tools_dirs = @tools_dirs@
++uname_prog = @uname_prog@
++vio_dir = @vio_dir@
++vio_libs = @vio_libs@
++
++AUTOMAKE_OPTIONS = foreign
++
++# These are built from source in the Docs directory
++EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT
++SUBDIRS = . include @docs_dirs@ @readline_dir@ \
++			@thread_dirs@ pstack @sql_client_dirs@ \
++			@sql_server_dirs@ scripts @man_dirs@ tests \
++			BUILD netware os2 @libmysqld_dirs@ \
++			@bench_dirs@ support-files @tools_dirs@
++
++
++# Relink after clean
++linked_sources = linked_client_sources linked_server_sources \
++		 linked_libmysql_sources linked_libmysql_r_sources \
++		 linked_libmysqld_sources  linked_libmysqldex_sources \
++		 linked_include_sources @linked_netware_sources@
++
++
++CLEANFILES = $(linked_sources)
++subdir = .
++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
++CONFIG_HEADER = config.h
++CONFIG_CLEAN_FILES = bdb/Makefile
++DIST_SOURCES =
++
++RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
++	ps-recursive install-info-recursive uninstall-info-recursive \
++	all-recursive install-data-recursive install-exec-recursive \
++	installdirs-recursive install-recursive uninstall-recursive \
++	check-recursive installcheck-recursive
++DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure COPYING \
++	ChangeLog Makefile.am acconfig.h acinclude.m4 aclocal.m4 \
++	config.guess config.h.in config.sub configure configure.in \
++	depcomp install-sh ltconfig ltmain.sh missing mkinstalldirs
++DIST_SUBDIRS = $(SUBDIRS)
++all: config.h
++	$(MAKE) $(AM_MAKEFLAGS) all-recursive
++
++.SUFFIXES:
++
++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
++ configure.lineno
++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++	cd $(top_srcdir) && \
++	  $(AUTOMAKE) --foreign  Makefile
++Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
++
++$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++	$(SHELL) ./config.status --recheck
++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
++	cd $(srcdir) && $(AUTOCONF)
++
++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
++	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
++
++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
++	@rm -f stamp-h1
++	cd $(top_builddir) && $(SHELL) ./config.status config.h
++
++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
++	cd $(top_srcdir) && $(AUTOHEADER)
++	touch $(srcdir)/config.h.in
++
++distclean-hdr:
++	-rm -f config.h stamp-h1
++bdb/Makefile: $(top_builddir)/config.status $(top_srcdir)/bdb/Makefile.in
++	cd $(top_builddir) && $(SHELL) ./config.status $@
++
++mostlyclean-libtool:
++	-rm -f *.lo
++
++clean-libtool:
++	-rm -rf .libs _libs
++
++distclean-libtool:
++	-rm -f libtool
++uninstall-info-am:
++
++# This directory's subdirectories are mostly independent; you can cd
++# into them and run `make' without going through this Makefile.
++# To change the values of `make' variables: instead of editing Makefiles,
++# (1) if the variable is set in `config.status', edit `config.status'
++#     (which will cause the Makefiles to be regenerated when you run `make');
++# (2) otherwise, pass the desired values on the `make' command line.
++$(RECURSIVE_TARGETS):
++	@set fnord $$MAKEFLAGS; amf=$$2; \
++	dot_seen=no; \
++	target=`echo $@ | sed s/-recursive//`; \
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  echo "Making $$target in $$subdir"; \
++	  if test "$$subdir" = "."; then \
++	    dot_seen=yes; \
++	    local_target="$$target-am"; \
++	  else \
++	    local_target="$$target"; \
++	  fi; \
++	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	done; \
++	if test "$$dot_seen" = "no"; then \
++	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
++	fi; test -z "$$fail"
++
++mostlyclean-recursive clean-recursive distclean-recursive \
++maintainer-clean-recursive:
++	@set fnord $$MAKEFLAGS; amf=$$2; \
++	dot_seen=no; \
++	case "$@" in \
++	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
++	  *) list='$(SUBDIRS)' ;; \
++	esac; \
++	rev=''; for subdir in $$list; do \
++	  if test "$$subdir" = "."; then :; else \
++	    rev="$$subdir $$rev"; \
++	  fi; \
++	done; \
++	rev="$$rev ."; \
++	target=`echo $@ | sed s/-recursive//`; \
++	for subdir in $$rev; do \
++	  echo "Making $$target in $$subdir"; \
++	  if test "$$subdir" = "."; then \
++	    local_target="$$target-am"; \
++	  else \
++	    local_target="$$target"; \
++	  fi; \
++	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	done && test -z "$$fail"
++tags-recursive:
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
++	done
++ctags-recursive:
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
++	done
++
++ETAGS = etags
++ETAGSFLAGS =
++
++CTAGS = ctags
++CTAGSFLAGS =
++
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	mkid -fID $$unique
++
++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	tags=; \
++	here=`pwd`; \
++	if (etags --etags-include --version) >/dev/null 2>&1; then \
++	  include_option=--etags-include; \
++	else \
++	  include_option=--include; \
++	fi; \
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  if test "$$subdir" = .; then :; else \
++	    test -f $$subdir/TAGS && \
++	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
++	  fi; \
++	done; \
++	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	test -z "$(ETAGS_ARGS)$$tags$$unique" \
++	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++	     $$tags $$unique
++
++ctags: CTAGS
++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	tags=; \
++	here=`pwd`; \
++	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	test -z "$(CTAGS_ARGS)$$tags$$unique" \
++	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
++	     $$tags $$unique
++
++GTAGS:
++	here=`$(am__cd) $(top_builddir) && pwd` \
++	  && cd $(top_srcdir) \
++	  && gtags -i $(GTAGS_ARGS) $$here
++
++distclean-tags:
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
++
++top_distdir = .
++distdir = $(PACKAGE)-$(VERSION)
++
++am__remove_distdir = \
++  { test ! -d $(distdir) \
++    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
++         && rm -fr $(distdir); }; }
++
++GZIP_ENV = --best
++distuninstallcheck_listfiles = find . -type f -print
++distcleancheck_listfiles = find . -type f -print
++
++distdir: $(DISTFILES)
++	$(am__remove_distdir)
++	mkdir $(distdir)
++	$(mkinstalldirs) $(distdir)/bdb $(distdir)/include
++	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
++	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
++	list='$(DISTFILES)'; for file in $$list; do \
++	  case $$file in \
++	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
++	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
++	  esac; \
++	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
++	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	    dir="/$$dir"; \
++	    $(mkinstalldirs) "$(distdir)$$dir"; \
++	  else \
++	    dir=''; \
++	  fi; \
++	  if test -d $$d/$$file; then \
++	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
++	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
++	    fi; \
++	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
++	  else \
++	    test -f $(distdir)/$$file \
++	    || cp -p $$d/$$file $(distdir)/$$file \
++	    || exit 1; \
++	  fi; \
++	done
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  if test "$$subdir" = .; then :; else \
++	    test -d $(distdir)/$$subdir \
++	    || mkdir $(distdir)/$$subdir \
++	    || exit 1; \
++	    (cd $$subdir && \
++	      $(MAKE) $(AM_MAKEFLAGS) \
++	        top_distdir="$(top_distdir)" \
++	        distdir=../$(distdir)/$$subdir \
++	        distdir) \
++	      || exit 1; \
++	  fi; \
++	done
++	$(MAKE) $(AM_MAKEFLAGS) \
++	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
++	  dist-hook
++	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
++	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
++	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
++	|| chmod -R a+r $(distdir)
++dist-gzip: distdir
++	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
++	$(am__remove_distdir)
++
++dist dist-all: distdir
++	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
++	$(am__remove_distdir)
++
++# This target untars the dist file and tries a VPATH configuration.  Then
++# it guarantees that the distribution is self-contained by making another
++# tarfile.
++distcheck: dist
++	$(am__remove_distdir)
++	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
++	chmod -R a-w $(distdir); chmod a+w $(distdir)
++	mkdir $(distdir)/_build
++	mkdir $(distdir)/_inst
++	chmod a-w $(distdir)
++	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
++	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
++	  && cd $(distdir)/_build \
++	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
++	    $(DISTCHECK_CONFIGURE_FLAGS) \
++	  && $(MAKE) $(AM_MAKEFLAGS) \
++	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
++	  && $(MAKE) $(AM_MAKEFLAGS) check \
++	  && $(MAKE) $(AM_MAKEFLAGS) install \
++	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
++	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
++	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
++	        distuninstallcheck \
++	  && chmod -R a-w "$$dc_install_base" \
++	  && ({ \
++	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
++	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
++	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
++	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
++	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
++	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
++	  && rm -rf "$$dc_destdir" \
++	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
++	  && rm -f $(distdir).tar.gz \
++	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
++	$(am__remove_distdir)
++	@echo "$(distdir).tar.gz is ready for distribution" | \
++	  sed 'h;s/./=/g;p;x;p;x'
++distuninstallcheck:
++	@cd $(distuninstallcheck_dir) \
++	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
++	   || { echo "ERROR: files left after uninstall:" ; \
++	        if test -n "$(DESTDIR)"; then \
++	          echo "  (check DESTDIR support)"; \
++	        fi ; \
++	        $(distuninstallcheck_listfiles) ; \
++	        exit 1; } >&2
++distcleancheck: distclean
++	@if test '$(srcdir)' = . ; then \
++	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
++	  exit 1 ; \
++	fi
++	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
++	  || { echo "ERROR: files left in build directory after distclean:" ; \
++	       $(distcleancheck_listfiles) ; \
++	       exit 1; } >&2
++check-am: all-am
++check: check-recursive
++all-am: Makefile config.h
++installdirs: installdirs-recursive
++installdirs-am:
++
++install: install-recursive
++install-exec: install-exec-recursive
++install-data: install-data-recursive
++uninstall: uninstall-recursive
++
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++
++installcheck: installcheck-recursive
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
++	  `test -z '$(STRIP)' || \
++	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
++mostlyclean-generic:
++
++clean-generic:
++	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
++
++distclean-generic:
++	-rm -f $(CONFIG_CLEAN_FILES)
++
++maintainer-clean-generic:
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
++clean: clean-recursive
++
++clean-am: clean-generic clean-libtool mostlyclean-am
++
++distclean: distclean-recursive
++	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
++	-rm -f Makefile
++distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
++	distclean-tags
++
++dvi: dvi-recursive
++
++dvi-am:
++
++info: info-recursive
++
++info-am:
++
++install-data-am:
++
++install-exec-am:
++
++install-info: install-info-recursive
++
++install-man:
++
++installcheck-am:
++
++maintainer-clean: maintainer-clean-recursive
++	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
++	-rm -rf $(top_srcdir)/autom4te.cache
++	-rm -f Makefile
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-recursive
++
++mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++
++pdf: pdf-recursive
++
++pdf-am:
++
++ps: ps-recursive
++
++ps-am:
++
++uninstall-am: uninstall-info-am
++
++uninstall-info: uninstall-info-recursive
++
++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
++	clean-generic clean-libtool clean-recursive ctags \
++	ctags-recursive dist dist-all dist-gzip distcheck distclean \
++	distclean-generic distclean-hdr distclean-libtool \
++	distclean-recursive distclean-tags distcleancheck distdir \
++	distuninstallcheck dvi dvi-am dvi-recursive info info-am \
++	info-recursive install install-am install-data install-data-am \
++	install-data-recursive install-exec install-exec-am \
++	install-exec-recursive install-info install-info-am \
++	install-info-recursive install-man install-recursive \
++	install-strip installcheck installcheck-am installdirs \
++	installdirs-am installdirs-recursive maintainer-clean \
++	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
++	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
++	pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
++	tags-recursive uninstall uninstall-am uninstall-info-am \
++	uninstall-info-recursive uninstall-recursive
++
++
++# This is just so that the linking is done early.
++config.h: $(linked_sources)
++
++linked_include_sources:
++	cd include; $(MAKE) link_sources
++	echo timestamp > linked_include_sources
++
++linked_client_sources:  @linked_client_targets@
++	cd client; $(MAKE) link_sources
++	echo timestamp > linked_client_sources
++
++linked_libmysql_sources:
++	cd libmysql; $(MAKE) link_sources
++	echo timestamp > linked_libmysql_sources
++
++linked_libmysql_r_sources: linked_libmysql_sources
++	cd libmysql_r; $(MAKE) link_sources
++	echo timestamp > linked_libmysql_r_sources
++
++linked_libmysqld_sources:
++	cd libmysqld; $(MAKE) link_sources
++	echo timestamp > linked_libmysqld_sources
++
++linked_libmysqldex_sources:
++	cd libmysqld/examples; $(MAKE) link_sources
++	echo timestamp > linked_libmysqldex_sources
++
++linked_netware_sources:
++	cd @netware_dir@; $(MAKE) link_sources
++	echo timestamp > linked_netware_sources
++
++#avoid recursive make calls in sql directory
++linked_server_sources:
++	cd sql; rm -f mini_client_errors.c;@LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c
++	echo timestamp > linked_server_sources
++
++# Create permission databases
++init-db:		all
++	$(top_builddir)/scripts/mysql_install_db
++
++bin-dist:		all
++	$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
++
++# Remove BK's "SCCS" subdirectories from source distribution
++dist-hook:
++	rm -rf `find $(distdir) -type d -name SCCS`
++
++tags:
++	support-files/build-tags
++.PHONY:		init-db bin-dist
++
++# Test installation
++
++test:
++	cd mysql-test ; ./mysql-test-run
++# Tell versions [3.59,3.63) of GNU make to not export all variables.
++# Otherwise a system limit (for SysV at least) may be exceeded.
++.NOEXPORT:

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/01_MAKEFILES__Docs_Makefile.in.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,776 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_MAKEFILES__Docs_Makefile.in.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Creates Docs/Makefile.in
+
+ at DPATCH@
+
+--- old/Docs/Makefile.in	2005-03-01 02:08:01.877429040 +0100
++++ new/Docs/Makefile.in	2005-02-28 21:21:24.000000000 +0100
+@@ -0,0 +1,765 @@
++# Makefile.in generated by automake 1.7.9 from Makefile.am.
++# @configure_input@
++
++# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
++# Free Software Foundation, Inc.
++# This Makefile.in is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
++# PARTICULAR PURPOSE.
++
++ at SET_MAKE@
++
++# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
++# 
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++# 
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++# 
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++
++# Process this file with automake to create Makefile.in
++
++srcdir = @srcdir@
++top_srcdir = @top_srcdir@
++VPATH = @srcdir@
++pkgdatadir = $(datadir)/@PACKAGE@
++pkglibdir = $(libdir)/@PACKAGE@
++pkgincludedir = $(includedir)/@PACKAGE@
++top_builddir = .
++
++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
++INSTALL = @INSTALL@
++install_sh_DATA = $(install_sh) -c -m 644
++install_sh_PROGRAM = $(install_sh) -c
++install_sh_SCRIPT = $(install_sh) -c
++INSTALL_HEADER = $(INSTALL_DATA)
++transform = $(program_transform_name)
++NORMAL_INSTALL = :
++PRE_INSTALL = :
++POST_INSTALL = :
++NORMAL_UNINSTALL = :
++PRE_UNINSTALL = :
++POST_UNINSTALL = :
++build_triplet = @build@
++host_triplet = @host@
++target_triplet = @target@
++ACLOCAL = @ACLOCAL@
++ALLOCA = @ALLOCA@
++AMDEP_FALSE = @AMDEP_FALSE@
++AMDEP_TRUE = @AMDEP_TRUE@
++AMTAR = @AMTAR@
++AR = @AR@
++AS = @AS@
++ASSEMBLER_FALSE = @ASSEMBLER_FALSE@
++ASSEMBLER_TRUE = @ASSEMBLER_TRUE@
++ASSEMBLER_sparc32_FALSE = @ASSEMBLER_sparc32_FALSE@
++ASSEMBLER_sparc32_TRUE = @ASSEMBLER_sparc32_TRUE@
++ASSEMBLER_sparc64_FALSE = @ASSEMBLER_sparc64_FALSE@
++ASSEMBLER_sparc64_TRUE = @ASSEMBLER_sparc64_TRUE@
++ASSEMBLER_x86_FALSE = @ASSEMBLER_x86_FALSE@
++ASSEMBLER_x86_TRUE = @ASSEMBLER_x86_TRUE@
++AUTOCONF = @AUTOCONF@
++AUTOHEADER = @AUTOHEADER@
++AUTOMAKE = @AUTOMAKE@
++AVAILABLE_LANGUAGES = @AVAILABLE_LANGUAGES@
++AVAILABLE_LANGUAGES_ERRORS = @AVAILABLE_LANGUAGES_ERRORS@
++AWK = @AWK@
++CC = @CC@
++CCAS = @CCAS@
++CCASFLAGS = @CCASFLAGS@
++CCDEPMODE = @CCDEPMODE@
++CC_VERSION = @CC_VERSION@
++CFLAGS = @CFLAGS@
++CHARSETS_NEED_SOURCE = @CHARSETS_NEED_SOURCE@
++CHARSET_OBJS = @CHARSET_OBJS@
++CHARSET_SRCS = @CHARSET_SRCS@
++CHECK_PID = @CHECK_PID@
++CHMOD = @CHMOD@
++CLIENT_EXTRA_LDFLAGS = @CLIENT_EXTRA_LDFLAGS@
++CLIENT_LIBS = @CLIENT_LIBS@
++CMP = @CMP@
++COMPILATION_COMMENT = @COMPILATION_COMMENT@
++COMPILE_PSTACK_FALSE = @COMPILE_PSTACK_FALSE@
++COMPILE_PSTACK_TRUE = @COMPILE_PSTACK_TRUE@
++CONF_COMMAND = @CONF_COMMAND@
++CP = @CP@
++CPP = @CPP@
++CPPFLAGS = @CPPFLAGS@
++CXX = @CXX@
++CXXCPP = @CXXCPP@
++CXXDEPMODE = @CXXDEPMODE@
++CXXFLAGS = @CXXFLAGS@
++CXXLDFLAGS = @CXXLDFLAGS@
++CXX_VERSION = @CXX_VERSION@
++CYGPATH_W = @CYGPATH_W@
++DEFS = @DEFS@
++DEPDIR = @DEPDIR@
++DOT_FRM_VERSION = @DOT_FRM_VERSION@
++DVIS = @DVIS@
++ECHO = @ECHO@
++ECHO_C = @ECHO_C@
++ECHO_N = @ECHO_N@
++ECHO_T = @ECHO_T@
++EGREP = @EGREP@
++EXEEXT = @EXEEXT@
++F77 = @F77@
++FFLAGS = @FFLAGS@
++FIND_PROC = @FIND_PROC@
++GETCONF = @GETCONF@
++GXX = @GXX@
++HAVE_NETWARE_FALSE = @HAVE_NETWARE_FALSE@
++HAVE_NETWARE_TRUE = @HAVE_NETWARE_TRUE@
++HOSTNAME = @HOSTNAME@
++INSTALL_DATA = @INSTALL_DATA@
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
++INSTALL_SCRIPT = @INSTALL_SCRIPT@
++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
++IS_LINUX = @IS_LINUX@
++KILL = @KILL@
++LD = @LD@
++LDFLAGS = @LDFLAGS@
++LIBDL = @LIBDL@
++LIBOBJS = @LIBOBJS@
++LIBS = @LIBS@
++LIBTOOL = @LIBTOOL@
++LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
++LM_CFLAGS = @LM_CFLAGS@
++LN = @LN@
++LN_CP_F = @LN_CP_F@
++LN_S = @LN_S@
++LOCAL_FALSE = @LOCAL_FALSE@
++LOCAL_TRUE = @LOCAL_TRUE@
++LTLIBOBJS = @LTLIBOBJS@
++MACHINE_TYPE = @MACHINE_TYPE@
++MAINT = @MAINT@
++MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
++MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
++MAKEINFO = @MAKEINFO@
++MAKE_BINARY_DISTRIBUTION_OPTIONS = @MAKE_BINARY_DISTRIBUTION_OPTIONS@
++MAKE_SHELL = @MAKE_SHELL@
++MT_INCLUDES = @MT_INCLUDES@
++MT_LD_ADD = @MT_LD_ADD@
++MV = @MV@
++MYSQLD_DEFAULT_SWITCHES = @MYSQLD_DEFAULT_SWITCHES@
++MYSQLD_EXTRA_LDFLAGS = @MYSQLD_EXTRA_LDFLAGS@
++MYSQLD_USER = @MYSQLD_USER@
++MYSQL_BASE_VERSION = @MYSQL_BASE_VERSION@
++MYSQL_NO_DASH_VERSION = @MYSQL_NO_DASH_VERSION@
++MYSQL_SERVER_SUFFIX = @MYSQL_SERVER_SUFFIX@
++MYSQL_TCP_PORT = @MYSQL_TCP_PORT@
++MYSQL_TCP_PORT_DEFAULT = @MYSQL_TCP_PORT_DEFAULT@
++MYSQL_UNIX_ADDR = @MYSQL_UNIX_ADDR@
++MYSQL_VERSION_ID = @MYSQL_VERSION_ID@
++NOINST_LDFLAGS = @NOINST_LDFLAGS@
++OBJEXT = @OBJEXT@
++PACKAGE = @PACKAGE@
++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
++PACKAGE_NAME = @PACKAGE_NAME@
++PACKAGE_STRING = @PACKAGE_STRING@
++PACKAGE_TARNAME = @PACKAGE_TARNAME@
++PACKAGE_VERSION = @PACKAGE_VERSION@
++PATH_SEPARATOR = @PATH_SEPARATOR@
++PDFMANUAL = @PDFMANUAL@
++PERL = @PERL@
++PERL5 = @PERL5@
++PROTOCOL_VERSION = @PROTOCOL_VERSION@
++PS = @PS@
++RANLIB = @RANLIB@
++RM = @RM@
++SAVE_ASFLAGS = @SAVE_ASFLAGS@
++SAVE_CFLAGS = @SAVE_CFLAGS@
++SAVE_CXXFLAGS = @SAVE_CXXFLAGS@
++SAVE_CXXLDFLAGS = @SAVE_CXXLDFLAGS@
++SAVE_LDFLAGS = @SAVE_LDFLAGS@
++SED = @SED@
++SET_MAKE = @SET_MAKE@
++SHARED_LIB_VERSION = @SHARED_LIB_VERSION@
++SHELL = @SHELL@
++STRIP = @STRIP@
++SYSTEM_TYPE = @SYSTEM_TYPE@
++TAR = @TAR@
++TERMCAP_LIB = @TERMCAP_LIB@
++THREAD_LOBJECTS = @THREAD_LOBJECTS@
++THREAD_LPROGRAMS = @THREAD_LPROGRAMS@
++VERSION = @VERSION@
++WRAPLIBS = @WRAPLIBS@
++YACC = @YACC@
++ac_ct_AR = @ac_ct_AR@
++ac_ct_CC = @ac_ct_CC@
++ac_ct_CXX = @ac_ct_CXX@
++ac_ct_F77 = @ac_ct_F77@
++ac_ct_GETCONF = @ac_ct_GETCONF@
++ac_ct_RANLIB = @ac_ct_RANLIB@
++ac_ct_STRIP = @ac_ct_STRIP@
++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
++am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
++am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
++am__include = @am__include@
++am__leading_dot = @am__leading_dot@
++am__quote = @am__quote@
++bdb_includes = @bdb_includes@
++bdb_libs = @bdb_libs@
++bdb_libs_with_path = @bdb_libs_with_path@
++bench_dirs = @bench_dirs@
++bindir = @bindir@
++build = @build@
++build_alias = @build_alias@
++build_cpu = @build_cpu@
++build_os = @build_os@
++build_vendor = @build_vendor@
++datadir = @datadir@
++default_charset = @default_charset@
++docs_dirs = @docs_dirs@
++exec_prefix = @exec_prefix@
++host = @host@
++host_alias = @host_alias@
++host_cpu = @host_cpu@
++host_os = @host_os@
++host_vendor = @host_vendor@
++includedir = @includedir@
++infodir = @infodir@
++innodb_includes = @innodb_includes@
++innodb_libs = @innodb_libs@
++innodb_system_libs = @innodb_system_libs@
++install_sh = @install_sh@
++isam_libs = @isam_libs@
++libdir = @libdir@
++libexecdir = @libexecdir@
++libmysqld_dirs = @libmysqld_dirs@
++linked_client_targets = @linked_client_targets@
++linked_netware_sources = @linked_netware_sources@
++localstatedir = @localstatedir@
++man_dirs = @man_dirs@
++mandir = @mandir@
++netware_dir = @netware_dir@
++oldincludedir = @oldincludedir@
++openssl_includes = @openssl_includes@
++openssl_libs = @openssl_libs@
++orbit_idl = @orbit_idl@
++orbit_includes = @orbit_includes@
++orbit_libs = @orbit_libs@
++prefix = @prefix@
++program_transform_name = @program_transform_name@
++pstack_dirs = @pstack_dirs@
++pstack_libs = @pstack_libs@
++readline_dir = @readline_dir@
++readline_link = @readline_link@
++sbindir = @sbindir@
++server_scripts = @server_scripts@
++sharedstatedir = @sharedstatedir@
++sql_client_dirs = @sql_client_dirs@
++sql_server_dirs = @sql_server_dirs@
++sysconfdir = @sysconfdir@
++target = @target@
++target_alias = @target_alias@
++target_cpu = @target_cpu@
++target_os = @target_os@
++target_vendor = @target_vendor@
++thread_dirs = @thread_dirs@
++tools_dirs = @tools_dirs@
++uname_prog = @uname_prog@
++vio_dir = @vio_dir@
++vio_libs = @vio_libs@
++
++AUTOMAKE_OPTIONS = foreign
++
++# These are built from source in the Docs directory
++EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT
++SUBDIRS = . include @docs_dirs@ @readline_dir@ \
++			@thread_dirs@ pstack @sql_client_dirs@ \
++			@sql_server_dirs@ scripts @man_dirs@ tests \
++			BUILD netware os2 @libmysqld_dirs@ \
++			@bench_dirs@ support-files @tools_dirs@
++
++
++# Relink after clean
++linked_sources = linked_client_sources linked_server_sources \
++		 linked_libmysql_sources linked_libmysql_r_sources \
++		 linked_libmysqld_sources  linked_libmysqldex_sources \
++		 linked_include_sources @linked_netware_sources@
++
++
++CLEANFILES = $(linked_sources)
++subdir = .
++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
++CONFIG_HEADER = config.h
++CONFIG_CLEAN_FILES = bdb/Makefile
++DIST_SOURCES =
++
++RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
++	ps-recursive install-info-recursive uninstall-info-recursive \
++	all-recursive install-data-recursive install-exec-recursive \
++	installdirs-recursive install-recursive uninstall-recursive \
++	check-recursive installcheck-recursive
++DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure COPYING \
++	ChangeLog Makefile.am acconfig.h acinclude.m4 aclocal.m4 \
++	config.guess config.h.in config.sub configure configure.in \
++	depcomp install-sh ltconfig ltmain.sh missing mkinstalldirs
++DIST_SUBDIRS = $(SUBDIRS)
++all: config.h
++	$(MAKE) $(AM_MAKEFLAGS) all-recursive
++
++.SUFFIXES:
++
++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
++ configure.lineno
++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
++	cd $(top_srcdir) && \
++	  $(AUTOMAKE) --foreign  Makefile
++Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
++	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
++
++$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
++	$(SHELL) ./config.status --recheck
++$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
++	cd $(srcdir) && $(AUTOCONF)
++
++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
++	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
++
++stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
++	@rm -f stamp-h1
++	cd $(top_builddir) && $(SHELL) ./config.status config.h
++
++$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
++	cd $(top_srcdir) && $(AUTOHEADER)
++	touch $(srcdir)/config.h.in
++
++distclean-hdr:
++	-rm -f config.h stamp-h1
++bdb/Makefile: $(top_builddir)/config.status $(top_srcdir)/bdb/Makefile.in
++	cd $(top_builddir) && $(SHELL) ./config.status $@
++
++mostlyclean-libtool:
++	-rm -f *.lo
++
++clean-libtool:
++	-rm -rf .libs _libs
++
++distclean-libtool:
++	-rm -f libtool
++uninstall-info-am:
++
++# This directory's subdirectories are mostly independent; you can cd
++# into them and run `make' without going through this Makefile.
++# To change the values of `make' variables: instead of editing Makefiles,
++# (1) if the variable is set in `config.status', edit `config.status'
++#     (which will cause the Makefiles to be regenerated when you run `make');
++# (2) otherwise, pass the desired values on the `make' command line.
++$(RECURSIVE_TARGETS):
++	@set fnord $$MAKEFLAGS; amf=$$2; \
++	dot_seen=no; \
++	target=`echo $@ | sed s/-recursive//`; \
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  echo "Making $$target in $$subdir"; \
++	  if test "$$subdir" = "."; then \
++	    dot_seen=yes; \
++	    local_target="$$target-am"; \
++	  else \
++	    local_target="$$target"; \
++	  fi; \
++	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	done; \
++	if test "$$dot_seen" = "no"; then \
++	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
++	fi; test -z "$$fail"
++
++mostlyclean-recursive clean-recursive distclean-recursive \
++maintainer-clean-recursive:
++	@set fnord $$MAKEFLAGS; amf=$$2; \
++	dot_seen=no; \
++	case "$@" in \
++	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
++	  *) list='$(SUBDIRS)' ;; \
++	esac; \
++	rev=''; for subdir in $$list; do \
++	  if test "$$subdir" = "."; then :; else \
++	    rev="$$subdir $$rev"; \
++	  fi; \
++	done; \
++	rev="$$rev ."; \
++	target=`echo $@ | sed s/-recursive//`; \
++	for subdir in $$rev; do \
++	  echo "Making $$target in $$subdir"; \
++	  if test "$$subdir" = "."; then \
++	    local_target="$$target-am"; \
++	  else \
++	    local_target="$$target"; \
++	  fi; \
++	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
++	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
++	done && test -z "$$fail"
++tags-recursive:
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
++	done
++ctags-recursive:
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
++	done
++
++ETAGS = etags
++ETAGSFLAGS =
++
++CTAGS = ctags
++CTAGSFLAGS =
++
++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
++	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	mkid -fID $$unique
++
++TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	tags=; \
++	here=`pwd`; \
++	if (etags --etags-include --version) >/dev/null 2>&1; then \
++	  include_option=--etags-include; \
++	else \
++	  include_option=--include; \
++	fi; \
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  if test "$$subdir" = .; then :; else \
++	    test -f $$subdir/TAGS && \
++	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
++	  fi; \
++	done; \
++	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	test -z "$(ETAGS_ARGS)$$tags$$unique" \
++	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
++	     $$tags $$unique
++
++ctags: CTAGS
++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
++		$(TAGS_FILES) $(LISP)
++	tags=; \
++	here=`pwd`; \
++	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
++	unique=`for i in $$list; do \
++	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
++	  done | \
++	  $(AWK) '    { files[$$0] = 1; } \
++	       END { for (i in files) print i; }'`; \
++	test -z "$(CTAGS_ARGS)$$tags$$unique" \
++	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
++	     $$tags $$unique
++
++GTAGS:
++	here=`$(am__cd) $(top_builddir) && pwd` \
++	  && cd $(top_srcdir) \
++	  && gtags -i $(GTAGS_ARGS) $$here
++
++distclean-tags:
++	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
++
++top_distdir = .
++distdir = $(PACKAGE)-$(VERSION)
++
++am__remove_distdir = \
++  { test ! -d $(distdir) \
++    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
++         && rm -fr $(distdir); }; }
++
++GZIP_ENV = --best
++distuninstallcheck_listfiles = find . -type f -print
++distcleancheck_listfiles = find . -type f -print
++
++distdir: $(DISTFILES)
++	$(am__remove_distdir)
++	mkdir $(distdir)
++	$(mkinstalldirs) $(distdir)/bdb $(distdir)/include
++	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
++	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
++	list='$(DISTFILES)'; for file in $$list; do \
++	  case $$file in \
++	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
++	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
++	  esac; \
++	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
++	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
++	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
++	    dir="/$$dir"; \
++	    $(mkinstalldirs) "$(distdir)$$dir"; \
++	  else \
++	    dir=''; \
++	  fi; \
++	  if test -d $$d/$$file; then \
++	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
++	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
++	    fi; \
++	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
++	  else \
++	    test -f $(distdir)/$$file \
++	    || cp -p $$d/$$file $(distdir)/$$file \
++	    || exit 1; \
++	  fi; \
++	done
++	list='$(SUBDIRS)'; for subdir in $$list; do \
++	  if test "$$subdir" = .; then :; else \
++	    test -d $(distdir)/$$subdir \
++	    || mkdir $(distdir)/$$subdir \
++	    || exit 1; \
++	    (cd $$subdir && \
++	      $(MAKE) $(AM_MAKEFLAGS) \
++	        top_distdir="$(top_distdir)" \
++	        distdir=../$(distdir)/$$subdir \
++	        distdir) \
++	      || exit 1; \
++	  fi; \
++	done
++	$(MAKE) $(AM_MAKEFLAGS) \
++	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
++	  dist-hook
++	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
++	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
++	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
++	|| chmod -R a+r $(distdir)
++dist-gzip: distdir
++	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
++	$(am__remove_distdir)
++
++dist dist-all: distdir
++	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
++	$(am__remove_distdir)
++
++# This target untars the dist file and tries a VPATH configuration.  Then
++# it guarantees that the distribution is self-contained by making another
++# tarfile.
++distcheck: dist
++	$(am__remove_distdir)
++	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
++	chmod -R a-w $(distdir); chmod a+w $(distdir)
++	mkdir $(distdir)/_build
++	mkdir $(distdir)/_inst
++	chmod a-w $(distdir)
++	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
++	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
++	  && cd $(distdir)/_build \
++	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
++	    $(DISTCHECK_CONFIGURE_FLAGS) \
++	  && $(MAKE) $(AM_MAKEFLAGS) \
++	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
++	  && $(MAKE) $(AM_MAKEFLAGS) check \
++	  && $(MAKE) $(AM_MAKEFLAGS) install \
++	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
++	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
++	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
++	        distuninstallcheck \
++	  && chmod -R a-w "$$dc_install_base" \
++	  && ({ \
++	       (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
++	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
++	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
++	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
++	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
++	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
++	  && rm -rf "$$dc_destdir" \
++	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
++	  && rm -f $(distdir).tar.gz \
++	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
++	$(am__remove_distdir)
++	@echo "$(distdir).tar.gz is ready for distribution" | \
++	  sed 'h;s/./=/g;p;x;p;x'
++distuninstallcheck:
++	@cd $(distuninstallcheck_dir) \
++	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
++	   || { echo "ERROR: files left after uninstall:" ; \
++	        if test -n "$(DESTDIR)"; then \
++	          echo "  (check DESTDIR support)"; \
++	        fi ; \
++	        $(distuninstallcheck_listfiles) ; \
++	        exit 1; } >&2
++distcleancheck: distclean
++	@if test '$(srcdir)' = . ; then \
++	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
++	  exit 1 ; \
++	fi
++	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
++	  || { echo "ERROR: files left in build directory after distclean:" ; \
++	       $(distcleancheck_listfiles) ; \
++	       exit 1; } >&2
++check-am: all-am
++check: check-recursive
++all-am: Makefile config.h
++installdirs: installdirs-recursive
++installdirs-am:
++
++install: install-recursive
++install-exec: install-exec-recursive
++install-data: install-data-recursive
++uninstall: uninstall-recursive
++
++install-am: all-am
++	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
++
++installcheck: installcheck-recursive
++install-strip:
++	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
++	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
++	  `test -z '$(STRIP)' || \
++	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
++mostlyclean-generic:
++
++clean-generic:
++	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
++
++distclean-generic:
++	-rm -f $(CONFIG_CLEAN_FILES)
++
++maintainer-clean-generic:
++	@echo "This command is intended for maintainers to use"
++	@echo "it deletes files that may require special tools to rebuild."
++clean: clean-recursive
++
++clean-am: clean-generic clean-libtool mostlyclean-am
++
++distclean: distclean-recursive
++	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
++	-rm -f Makefile
++distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool \
++	distclean-tags
++
++dvi: dvi-recursive
++
++dvi-am:
++
++info: info-recursive
++
++info-am:
++
++install-data-am:
++
++install-exec-am:
++
++install-info: install-info-recursive
++
++install-man:
++
++installcheck-am:
++
++maintainer-clean: maintainer-clean-recursive
++	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
++	-rm -rf $(top_srcdir)/autom4te.cache
++	-rm -f Makefile
++maintainer-clean-am: distclean-am maintainer-clean-generic
++
++mostlyclean: mostlyclean-recursive
++
++mostlyclean-am: mostlyclean-generic mostlyclean-libtool
++
++pdf: pdf-recursive
++
++pdf-am:
++
++ps: ps-recursive
++
++ps-am:
++
++uninstall-am: uninstall-info-am
++
++uninstall-info: uninstall-info-recursive
++
++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
++	clean-generic clean-libtool clean-recursive ctags \
++	ctags-recursive dist dist-all dist-gzip distcheck distclean \
++	distclean-generic distclean-hdr distclean-libtool \
++	distclean-recursive distclean-tags distcleancheck distdir \
++	distuninstallcheck dvi dvi-am dvi-recursive info info-am \
++	info-recursive install install-am install-data install-data-am \
++	install-data-recursive install-exec install-exec-am \
++	install-exec-recursive install-info install-info-am \
++	install-info-recursive install-man install-recursive \
++	install-strip installcheck installcheck-am installdirs \
++	installdirs-am installdirs-recursive maintainer-clean \
++	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
++	mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
++	pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \
++	tags-recursive uninstall uninstall-am uninstall-info-am \
++	uninstall-info-recursive uninstall-recursive
++
++
++# This is just so that the linking is done early.
++config.h: $(linked_sources)
++
++linked_include_sources:
++	cd include; $(MAKE) link_sources
++	echo timestamp > linked_include_sources
++
++linked_client_sources:  @linked_client_targets@
++	cd client; $(MAKE) link_sources
++	echo timestamp > linked_client_sources
++
++linked_libmysql_sources:
++	cd libmysql; $(MAKE) link_sources
++	echo timestamp > linked_libmysql_sources
++
++linked_libmysql_r_sources: linked_libmysql_sources
++	cd libmysql_r; $(MAKE) link_sources
++	echo timestamp > linked_libmysql_r_sources
++
++linked_libmysqld_sources:
++	cd libmysqld; $(MAKE) link_sources
++	echo timestamp > linked_libmysqld_sources
++
++linked_libmysqldex_sources:
++	cd libmysqld/examples; $(MAKE) link_sources
++	echo timestamp > linked_libmysqldex_sources
++
++linked_netware_sources:
++	cd @netware_dir@; $(MAKE) link_sources
++	echo timestamp > linked_netware_sources
++
++#avoid recursive make calls in sql directory
++linked_server_sources:
++	cd sql; rm -f mini_client_errors.c;@LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c
++	echo timestamp > linked_server_sources
++
++# Create permission databases
++init-db:		all
++	$(top_builddir)/scripts/mysql_install_db
++
++bin-dist:		all
++	$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
++
++# Remove BK's "SCCS" subdirectories from source distribution
++dist-hook:
++	rm -rf `find $(distdir) -type d -name SCCS`
++
++tags:
++	support-files/build-tags
++.PHONY:		init-db bin-dist
++
++# Test installation
++
++test:
++	cd mysql-test ; ./mysql-test-run
++# Tell versions [3.59,3.63) of GNU make to not export all variables.
++# Otherwise a system limit (for SysV at least) may be exceeded.
++.NOEXPORT:

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/25_mysys__default.c.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/25_mysys__default.c.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/25_mysys__default.c.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_mysys__default.c.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: mysys__default.c
+
+ at DPATCH@
+diff -Nur mysql-dfsg-5.0-5.0.67.orig/mysys/default.c mysql-dfsg-5.0-5.0.67/mysys/default.c
+--- mysql-dfsg-5.0-5.0.67.orig/mysys/default.c	2008-08-04 14:19:45.000000000 +0200
++++ mysql-dfsg-5.0-5.0.67/mysys/default.c	2008-08-10 08:05:56.000000000 +0200
+@@ -1077,7 +1077,7 @@
+ 
+ #else
+ 
+-  errors += add_directory(alloc, "/etc/", dirs);
++  errors += add_directory(alloc, "/etc/mysql/", dirs);
+ 
+ #if defined(__EMX__) || defined(OS2)
+   if ((env= getenv("ETC")))

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/33_scripts__mysql_create_system_tables__no_test.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 33_scripts__mysql_create_system_tables__no_test.dpatch by <nobse at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't create guest account
+
+ at DPATCH@
+diff -Nur mysql-dfsg-5.0-5.0.75.orig/scripts/mysql_system_tables_data.sql mysql-dfsg-5.0-5.0.75/scripts/mysql_system_tables_data.sql
+--- mysql-dfsg-5.0-5.0.75.orig/scripts/mysql_system_tables_data.sql     2008-12-18 18:20:09.000000000 +0100
++++ mysql-dfsg-5.0-5.0.75/scripts/mysql_system_tables_data.sql  2008-12-22 09:48:57.000000000 +0100
+@@ -23,7 +23,5 @@
+ INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+ REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0 FROM dual WHERE LOWER( @current_hostname) != 'localhost';
+ REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+-INSERT INTO tmp_user (host,user) VALUES ('localhost','');
+-INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost';
+ INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
+ DROP TABLE tmp_user;

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/37_scripts__mysqld_safe.sh__syslog.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/37_scripts__mysqld_safe.sh__syslog.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/37_scripts__mysqld_safe.sh__syslog.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,124 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 37_scripts__mysqld_safe.sh__syslog.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: scripts__mysqld_safe.sh__syslog
+
+ at DPATCH@
+
+--- old/scripts/mysqld_safe.sh.orig	2005-11-15 01:12:47.000000000 +0100
++++ new/scripts/mysqld_safe.sh	2005-11-22 00:01:38.913802923 +0100
+@@ -13,6 +13,9 @@
+ KILL_MYSQLD=1;
+ MYSQLD=
+ 
++# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
++ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
++
+ trap '' 1 2 3 15			# we shouldn't let anyone kill us
+ 
+ umask 007
+@@ -76,7 +79,6 @@
+ 
+       # mysqld_safe-specific options - must be set in my.cnf ([mysqld_safe])!
+       --ledir=*)   ledir=`echo "$arg" | sed -e "s;--ledir=;;"` ;;
+-      --log-error=*) err_log=`echo "$arg" | sed -e "s;--log-error=;;"` ;;
+       --open-files-limit=*) open_files=`echo "$arg" | sed -e "s;--open-files-limit=;;"` ;;
+       --core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core-file-size=;;"` ;;
+       --timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;;
+@@ -177,7 +179,6 @@
+ 
+ # these rely on $DATADIR by default, so we'll set them later on
+ pid_file=
+-err_log=
+ 
+ # Get first arguments from the my.cnf file, groups [mysqld] and [mysqld_safe]
+ # and then merge with the command line arguments
+@@ -244,7 +245,6 @@
+     * )  pid_file="$DATADIR/$pid_file" ;;
+   esac
+ fi
+-test -z "$err_log"  && err_log=$DATADIR/`@HOSTNAME@`.err
+ 
+ if test -n "$mysql_unix_port"
+ then
+@@ -314,8 +314,6 @@
+   then
+     USER_OPTION="--user=$user"
+   fi
+-  # If we are root, change the err log to the right user.
+-  touch $err_log; chown $user $err_log
+   if test -n "$open_files"
+   then
+     ulimit -n $open_files
+@@ -337,18 +335,16 @@
+   then
+     if @FIND_PROC@
+     then    # The pid contains a mysqld process
+-      echo "A mysqld process already exists"
+-      echo "A mysqld process already exists at " `date` >> $err_log
++      echo "A mysqld process already exists" | $ERR_LOGGER -s
+       exit 1
+     fi
+   fi
+   rm -f $pid_file
+   if test -f $pid_file
+   then
+-    echo "Fatal error: Can't remove the pid file: $pid_file"
+-    echo "Fatal error: Can't remove the pid file: $pid_file at " `date` >> $err_log
+-    echo "Please remove it manually and start $0 again"
+-    echo "mysqld daemon not started"
++    echo "Fatal error: Can't remove the pid file: $pid_file" | $ERR_LOGGER -s
++    echo "Please remove it manually and start $0 again" | $ERR_LOGGER -s
++    echo "mysqld daemon not started" | $ERR_LOGGER -s
+     exit 1
+   fi
+ fi
+@@ -373,15 +369,15 @@
+ #  ulimit -n 256 > /dev/null 2>&1		# Fix for BSD and FreeBSD systems
+ #fi
+ 
+-echo "`date +'%y%m%d %H:%M:%S  mysqld started'`" >> $err_log
++echo "started" | $ERR_LOGGER -s
+ while true
+ do
+   rm -f $safe_mysql_unix_port $pid_file	# Some extra safety
+   if test -z "$args"
+   then
+-    $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ >> $err_log 2>&1
++    $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ 2>&1 | $ERR_LOGGER -t mysqld
+   else
+-    eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ $args >> $err_log 2>&1"
++    eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ $args 2>&1 | $ERR_LOGGER -t mysqld"
+   fi
+   if test ! -f $pid_file		# This is removed if normal shutdown
+   then
+@@ -398,7 +394,7 @@
+     # kill -9 is used or the process won't react on the kill.
+     numofproces=`ps xaww | grep -v "grep" | grep "$ledir/$MYSQLD\>" | grep -c "pid-file=$pid_file"`
+ 
+-    echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
++    echo "Number of processes running now: $numofproces" | $ERR_LOGGER -s
+     I=1
+     while test "$I" -le "$numofproces"
+     do 
+@@ -411,16 +407,14 @@
+       #    echo "TEST $I - $T **"
+       if kill -9 $T
+       then
+-        echo "$MYSQLD process hanging, pid $T - killed" | tee -a $err_log
++        echo "$MYSQLD process hanging, pid $T - killed" | $ERR_LOGGER -s
+       else 
+         break
+       fi
+       I=`expr $I + 1`
+     done
+   fi
+-  echo "`date +'%y%m%d %H:%M:%S'`  mysqld restarted" | tee -a $err_log
++  echo "restarted" | $ERR_LOGGER -s
+ done
+ 
+-echo "`date +'%y%m%d %H:%M:%S'`  mysqld ended" | tee -a $err_log
+-echo "" | tee -a $err_log
+-
++echo "ended" | $ERR_LOGGER -s

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/38_scripts__mysqld_safe.sh__signals.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 38_scripts__mysqld_safe.sh__signals.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Executes /etc/init.d/mysql on signals
+
+ at DPATCH@
+
+--- old/scripts/mysqld_safe.sh	2005-02-15 14:43:48.000000000 -0800
++++ new/scripts/mysqld_safe.sh	2005-02-21 13:02:55.000000000 -0800
+@@ -10,8 +10,6 @@
+ # mysql.server works by first doing a cd to the base directory and from there
+ # executing mysqld_safe
+ 
+-trap '' 1 2 3 15			# we shouldn't let anyone kill us
+-
+ umask 007
+ 
+ KILL_MYSQLD=1;
+@@ -274,6 +272,13 @@
+ fi
+ 
+ #
++# From now on, we catch signals to do a proper shutdown of mysqld
++# when signalled to do so.
++#
++trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf refresh' 1 # HUP
++trap '/usr/bin/mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf shutdown' 2 3 15 # INT QUIT and TERM
++
++#
+ # Uncomment the following lines if you want all tables to be automatically
+ # checked and repaired during startup. You should add sensible key_buffer
+ # and sort_buffer values to my.cnf to improve check performance or require
+@@ -299,9 +304,9 @@
+   rm -f $safe_mysql_unix_port $pid_file	# Some extra safety
+   if test -z "$args"
+   then
+-    $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ 2>&1 | $ERR_LOGGER -t mysqld
++    $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ 2>&1 | $ERR_LOGGER -t mysqld & wait
+   else
+-    eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ $args 2>&1 | $ERR_LOGGER -t mysqld"
++    eval "$NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file @MYSQLD_DEFAULT_SWITCHES@ $args 2>&1 | $ERR_LOGGER -t mysqld & wait"
+   fi
+   if test ! -f $pid_file		# This is removed if normal shutdown
+   then

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 41_scripts__mysql_install_db.sh__no_test.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: scripts__mysql_install_db.sh__no_test
+## DP: http://bugs.mysql.com/bug.php?id=6901
+
+ at DPATCH@
+--- mysql-dfsg-5.0-5.0.50.orig/scripts/mysql_install_db.sh	2007-10-19 17:17:12.000000000 +0200
++++ mysql-dfsg-5.0-5.0.50/scripts/mysql_install_db.sh	2007-11-26 19:48:30.000000000 +0100
+@@ -311,7 +311,7 @@
+ fi
+ 
+ # Create database directories mysql & test
+-for dir in $ldata $ldata/mysql $ldata/test
++for dir in $ldata $ldata/mysql
+ do
+   if test ! -d $dir
+   then

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/44_scripts__mysql_config__libs.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/44_scripts__mysql_config__libs.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/44_scripts__mysql_config__libs.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 99-unnamed.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Removes unnecessary library dependencies. See #390692
+
+ at DPATCH@
+
+--- old/scripts/mysql_config.sh	2006-08-25 23:12:10.000000000 +0200
++++ new/scripts/mysql_config.sh	2006-10-02 21:05:52.000000000 +0200
+@@ -98,10 +98,10 @@
+ 
+ # Create options 
+ # We intentionally add a space to the beginning and end of lib strings, simplifies replace later
+-libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
++libs=" $ldflags -L$pkglibdir -lmysqlclient"
+ libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
+-libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @LIBS@ @openssl_libs@ "
+-embedded_libs=" $ldflags -L$pkglibdir -lmysqld @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @innodb_system_libs@ @openssl_libs@ "
++libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @openssl_libs@ "
++embedded_libs=" $ldflags -L$pkglibdir -lmysqld @WRAPLIBS@ @innodb_system_libs@ @openssl_libs@ "
+ 
+ cflags="-I$pkgincludedir @CFLAGS@ " #note: end space!
+ include="-I$pkgincludedir"

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/45_warn-CLI-passwords.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/45_warn-CLI-passwords.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/45_warn-CLI-passwords.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,191 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 45_warn-CLI-passwords.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: warn-CLI-passwords
+
+ at DPATCH@
+
+--- old/client/mysqladmin.cc.orig	2005-11-15 01:12:30.000000000 +0100
++++ new/client/mysqladmin.cc	2005-11-22 00:17:41.327082273 +0100
+@@ -154,7 +154,7 @@
+   {"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
+    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+   {"password", 'p',
+-   "Password to use when connecting to server. If password is not given it's asked from the tty.",
++   "Password to use when connecting to server. If password is not given it's asked from the tty. WARNING: Providing a password on command line is insecure as it is visible through /proc to anyone for a short time.",
+    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ #ifdef __WIN__
+   {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
+--- old/client/mysql.cc.orig	2005-11-15 01:12:45.000000000 +0100
++++ new/client/mysql.cc	2005-11-22 00:17:41.329082230 +0100
+@@ -621,7 +621,7 @@
+    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ #endif
+   {"password", 'p',
+-   "Password to use when connecting to server. If password is not given it's asked from the tty.",
++   "Password to use when connecting to server. If password is not given it's asked from the tty. WARNING: This is insecure as the password is visible for anyone through /proc for a short time.",
+    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ #ifdef __WIN__
+   {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
+--- old/client/mysqldump.c.orig	2005-11-15 01:12:38.000000000 +0100
++++ new/client/mysqldump.c	2005-11-22 00:17:41.332082165 +0100
+@@ -323,7 +323,7 @@
+    "Sorts each table's rows by primary key, or first unique key, if such a key exists.  Useful when dumping a MyISAM table to be loaded into an InnoDB table, but will make the dump itself take considerably longer.",
+    (gptr*) &opt_order_by_primary, (gptr*) &opt_order_by_primary, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+   {"password", 'p',
+-   "Password to use when connecting to server. If password is not given it's solicited on the tty.",
++   "Password to use when connecting to server. If password is not given it's solicited on the tty. WARNING: Providing a password on command line is insecure as it is visible through /proc to anyone for a short time.",
+    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ #ifdef __WIN__
+   {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
+--- old/client/mysqlshow.c.orig	2005-11-15 01:12:47.000000000 +0100
++++ new/client/mysqlshow.c	2005-11-22 00:17:41.333082144 +0100
+@@ -185,7 +185,7 @@
+   {"keys", 'k', "Show keys for table.", (gptr*) &opt_show_keys,
+    (gptr*) &opt_show_keys, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+   {"password", 'p',
+-   "Password to use when connecting to server. If password is not given it's asked from the tty.",
++   "Password to use when connecting to server. If password is not given it's asked from the tty. WARNING: Providing a password on command line is insecure as it is visible through /proc to anyone for a short time.", 
+    0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+   {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port,
+    (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
+--- old/scripts/mysqlaccess.sh.orig	2005-11-15 01:12:32.000000000 +0100
++++ new/scripts/mysqlaccess.sh	2005-11-22 00:17:41.352081736 +0100
+@@ -74,11 +74,17 @@
+ 
+   -u, --user=#         username for logging in to the db
+   -p, --password=#     validate password for user
++                       WARNING: Providing a password on command line is
++                       insecure as it is visible through /proc to anyone
++                       for a short time.
+   -h, --host=#         name or IP-number of the host
+   -d, --db=#           name of the database
+ 
+   -U, --superuser=#    connect as superuser
+   -P, --spassword=#    password for superuser
++                       WARNING: Providing a password on command line is
++                       insecure as it is visible through /proc to anyone
++                       for a short time.
+   -H, --rhost=#        remote MySQL-server to connect to
+       --old_server     connect to old MySQL-server (before v3.21) which 
+                        does not yet know how to handle full where clauses.
+--- old/scripts/mysql_convert_table_format.sh.orig	2005-11-15 01:12:45.000000000 +0100
++++ new/scripts/mysql_convert_table_format.sh	2005-11-22 00:17:41.353081714 +0100
+@@ -107,6 +107,8 @@
+ 
+ --password='password'
+   Password for the current user.
++  WARNING: Providing a password on command line is insecure as it is visible
++  through /proc to anyone for a short time.
+ 
+ --port=port
+   TCP/IP port to connect to if host is not "localhost".
+--- old/scripts/mysqld_multi.sh.orig	2005-11-15 01:12:46.000000000 +0100
++++ new/scripts/mysqld_multi.sh	2005-11-22 00:17:41.355081671 +0100
+@@ -730,6 +730,9 @@
+ mysqladmin = /path/to/mysqladmin/mysqladmin
+ socket     = /tmp/mysql.sock3
+ port       = 3308
++                   WARNING: Providing a password on command line is
++                   insecure as it is visible through /proc to anyone
++                   for a short time.
+ pid-file   = @localstatedir at 3/hostname.pid3
+ datadir    = @localstatedir at 3
+ language   = @datadir@/mysql/swedish
+--- old/scripts/mysql_fix_privilege_tables.sh.orig	2005-11-15 01:12:47.000000000 +0100
++++ new/scripts/mysql_fix_privilege_tables.sh	2005-11-22 00:17:41.357081628 +0100
+@@ -33,6 +33,10 @@
+ 
+ case "$1" in
+     --no-defaults|--defaults-file=*|--defaults-extra-file=*)
++#
++# WARNING: Providing a password on command line is insecure as it is visible
++# through /proc to anyone for a short time.
++#
+       defaults="$1"; shift
+       ;;
+ esac
+--- old/scripts/mysqlhotcopy.sh.orig	2005-11-15 01:12:47.000000000 +0100
++++ new/scripts/mysqlhotcopy.sh	2005-11-22 00:17:41.358081607 +0100
+@@ -32,6 +32,7 @@
+ 
+   mysqlhotcopy --method='scp -Bq -i /usr/home/foo/.ssh/identity' --user=root --password=secretpassword \
+          db_1./^nice_table/ user at some.system.dom:~/path/to/new_directory
++  (INSECURE)
+ 
+ WARNING: THIS PROGRAM IS STILL IN BETA. Comments/patches welcome.
+ 
+@@ -53,6 +54,9 @@
+   -u, --user=#         user for database login if not current user
+   -p, --password=#     password to use when connecting to server (if not set
+                        in my.cnf, which is recommended)
++                       WARNING: Providing a password on command line is
++                       insecure as it is visible through /proc to anyone
++                       for a short time.
+   -h, --host=#         Hostname for local server when connecting over TCP/IP
+   -P, --port=#         port to use when connecting to local server with TCP/IP
+   -S, --socket=#       socket to use when connecting to local server
+@@ -1025,6 +1029,9 @@
+ one of the config files, normally /etc/my.cnf or your personal ~/.my.cnf.
+ (See the chapter 'my.cnf Option Files' in the manual)
+ 
++WARNING: Providing a password on command line is insecure as it is visible
++through /proc to anyone for a short time.
++
+ =item -h, -h, --host=#
+ 
+ Hostname for local server when connecting over TCP/IP.  By specifying this
+--- old/scripts/mysql_setpermission.sh.orig	2005-11-15 01:12:30.000000000 +0100
++++ new/scripts/mysql_setpermission.sh	2005-11-22 00:17:41.359081585 +0100
+@@ -647,6 +647,9 @@
+ 
+ --user		: is the username to connect with.
+ --password	: the password of the username.
++                  WARNING: Providing a password on command line is
++                  insecure as it is visible through /proc to anyone
++                  for a short time.
+ --host		: the host to connect to.
+ --socket	: the socket to connect to.
+ --port		: the port number of the host to connect to.
+--- old/scripts/mysql_tableinfo.sh.orig	2005-11-15 01:12:32.000000000 +0100
++++ new/scripts/mysql_tableinfo.sh	2005-11-22 00:17:41.360081564 +0100
+@@ -462,6 +462,8 @@
+ =item -p, --password=#     
+ 
+ password to use when connecting to server
++WARNING: Providing a password on command line is insecure as it is visible
++through /proc to anyone for a short time.
+ 
+ =item -h, --host=#     
+ 
+--- old/scripts/mysql_explain_log.sh	2007-02-20 18:49:37.000000000 +0100
++++ new/scripts/mysql_explain_log.sh	2007-03-22 22:32:26.000000000 +0100
+@@ -341,6 +341,9 @@
+     The MySQL username to use when connecting to the server
+ --password=PASSWORD, -p=PASSWORD
+     The password to use when connecting to the server
++    WARNING: Providing a password on command line is
++    insecure as it is visible through /proc to anyone
++    for a short time.
+ --socket=SOCKET, -s=SOCKET
+     The socket file to use when connecting to the server
+ --printerror=1, -e 1
+@@ -379,7 +382,7 @@
+ 
+ =head1 USAGE
+ 
+-mysql_explain_log [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw] [--socket=/path/to/socket] [--printerror=1] < logfile
++mysql_explain_log [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw (INSECURE)] [--socket=/path/to/socket] [--printerror=1] < logfile
+ 
+ --help, -h
+     Display this help message
+@@ -391,6 +394,8 @@
+     The MySQL username to use when connecting to the server
+ --password=PASSWORD, -p=PASSWORD
+     The password to use when connecting to the server
++    WARNING: Providing a password on command line is insecure
++    as it is visible through /proc to anyone for a short time.
+ --socket=SOCKET, -s=SOCKET
+     The socket file to use when connecting to the server
+ --printerror=1, -e 1

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/50_fix_agg_functions.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/50_fix_agg_functions.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/50_fix_agg_functions.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,104 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 50_fix_agg_functions.dpatch by Norbert Tretkowski <nobse at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: http://bugs.mysql.com/bug.php?id=39656
+
+ at DPATCH@
+=== modified file 'mysql-test/r/func_group.result'
+--- a/mysql-test/r/func_group.result	2008-03-06 15:19:24 +0000
++++ b/mysql-test/r/func_group.result	2008-11-24 15:30:24 +0000
+@@ -1425,4 +1425,27 @@ SELECT AVG(a), CAST(AVG(a) AS DECIMAL) F
+ AVG(a)	CAST(AVG(a) AS DECIMAL)
+ 15	15
+ DROP TABLE t1;
++CREATE TABLE t1 (a INT, b INT);
++INSERT INTO t1 VALUES (1,1), (1,2), (1,3);
++SET SQL_MODE='ONLY_FULL_GROUP_BY';
++SELECT COUNT(*) FROM t1;
++COUNT(*)
++3
++SELECT COUNT(*) FROM t1 where a=1;
++COUNT(*)
++3
++SELECT COUNT(*),a FROM t1;
++ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
++SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.a= b.a;
++COUNT(*)
++9
++SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a) 
++FROM t1 outr;
++ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
++SELECT COUNT(*) FROM t1 a JOIN t1 outr 
++ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a);
++COUNT(*)
++0
++SET SQL_MODE=default;
++DROP TABLE t1;
+ End of 5.0 tests
+
+=== modified file 'mysql-test/t/func_group.test'
+--- a/mysql-test/t/func_group.test	2008-03-06 15:19:24 +0000
++++ b/mysql-test/t/func_group.test	2008-11-24 15:30:24 +0000
+@@ -926,5 +926,34 @@ SELECT AVG(a), CAST(AVG(a) AS DECIMAL) F
+ 
+ DROP TABLE t1;
+ 
++#
++# Bug #39656: Behaviour different for agg functions with & without where -
++# ONLY_FULL_GROUP_BY
++#
++
++CREATE TABLE t1 (a INT, b INT);
++INSERT INTO t1 VALUES (1,1), (1,2), (1,3);
++
++SET SQL_MODE='ONLY_FULL_GROUP_BY';
++
++SELECT COUNT(*) FROM t1;
++SELECT COUNT(*) FROM t1 where a=1;
++
++--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
++SELECT COUNT(*),a FROM t1;
++
++SELECT COUNT(*) FROM t1 a JOIN t1 b ON a.a= b.a;
++
++--error ER_MIX_OF_GROUP_FUNC_AND_FIELDS
++SELECT COUNT(*), (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a) 
++  FROM t1 outr;
++
++SELECT COUNT(*) FROM t1 a JOIN t1 outr 
++  ON a.a= (SELECT count(*) FROM t1 inr WHERE inr.a = outr.a);
++
++SET SQL_MODE=default;
++DROP TABLE t1;
++
++
+ ###
+ --echo End of 5.0 tests
+
+=== modified file 'sql/sql_select.cc'
+--- a/sql/sql_select.cc	2008-11-03 09:50:09 +0000
++++ b/sql/sql_select.cc	2008-11-24 15:30:24 +0000
+@@ -390,11 +390,21 @@ inline int setup_without_group(THD *thd,
+ {
+   int res;
+   nesting_map save_allow_sum_func=thd->lex->allow_sum_func ;
++  /* 
++    Need to save the value, so we can turn off only the new NON_AGG_FIELD
++    additions coming from the WHERE
++  */
++  uint8 saved_flag= thd->lex->current_select->full_group_by_flag;
+   DBUG_ENTER("setup_without_group");
+ 
+   thd->lex->allow_sum_func&= ~(1 << thd->lex->current_select->nest_level);
+   res= setup_conds(thd, tables, leaves, conds);
+ 
++  /* it's not wrong to have non-aggregated columns in a WHERE */
++  if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY)
++    thd->lex->current_select->full_group_by_flag= saved_flag |
++      (thd->lex->current_select->full_group_by_flag & ~NON_AGG_FIELD_USED);
++
+   thd->lex->allow_sum_func|= 1 << thd->lex->current_select->nest_level;
+   res= res || setup_order(thd, ref_pointer_array, tables, fields, all_fields,
+                           order);
+

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/60_disabled_tests.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/60_disabled_tests.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/60_disabled_tests.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60_disabled_tests.dpatch by Norbert Tretkowski <nobse at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Disable tests which fail randomly.
+diff -Nur mysql-dfsg-5.0-5.0.67.orig/mysql-test/t/disabled.def mysql-dfsg-5.0-5.0.67/mysql-test/t/disabled.def
+--- mysql-dfsg-5.0-5.0.67.orig/mysql-test/t/disabled.def	2008-08-04 14:32:17.000000000 +0200
++++ mysql-dfsg-5.0-5.0.67/mysql-test/t/disabled.def	2008-08-10 09:13:43.000000000 +0200
+@@ -16,6 +16,10 @@
+ im_options_set       : Bug#20294: Instance manager tests fail randomly
+ im_options_unset     : Bug#20294: Instance manager tests fail randomly
+ im_utils             : Bug#20294: Instance manager tests fail randomly
++ndb_alter_table      : failed for some reason
++ndb_replace          : failed for some reason
++innodb_handler       : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491363
++rpl_ndb_innodb_trans : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=494238
+ grant_cache          : Bug#32651: grant_cache.test fails
+ rpl_log              : Bug#32653: rpl_log.test fails randomly
+ rpl_view             : Bug#32654: rpl_view.test fails randomly

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/86_PATH_MAX.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/86_PATH_MAX.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/86_PATH_MAX.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,139 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 86_PATH_MAX.dpatch by  <mbanck at debian.org> and Cyril Brulebois
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch to define PATH_MAX on systems which do not.
+## DP: http://bugs.mysql.com/16574 and Debian bug #378949, #348182.
+
+ at DPATCH@
+
+--- old/ndb/src/common/logger/FileLogHandler.cpp
++++ new/ndb/src/common/logger/FileLogHandler.cpp
+@@ -18,6 +18,10 @@
+ #include <FileLogHandler.hpp>
+ #include <File.hpp>
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ //
+ // PUBLIC
+ //
+--- old/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
++++ new/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+@@ -64,6 +64,10 @@
+ #define WRITEBUFFERSIZE 262144
+ #endif
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ const char *actionName[] = {
+   "open",
+   "close",
+--- old/ndb/src/kernel/blocks/ndbfs/Filename.cpp
++++ new/ndb/src/kernel/blocks/ndbfs/Filename.cpp
+@@ -25,6 +25,10 @@
+ 
+ #include <signaldata/FsOpenReq.hpp>
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ static const char* fileExtension[] = {
+   ".Data",
+   ".FragLog",
+--- old/ndb/src/kernel/blocks/ndbfs/Filename.hpp
++++ new/ndb/src/kernel/blocks/ndbfs/Filename.hpp
+@@ -17,6 +17,10 @@
+ #ifndef Filename_H
+ #define Filename_H
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ //===========================================================================
+ //
+ // .DESCRIPTION
+--- old/ndb/src/kernel/vm/Configuration.cpp
++++ new/ndb/src/kernel/vm/Configuration.cpp
+@@ -39,6 +39,10 @@
+ #include <LogLevel.hpp>
+ #include <NdbSleep.h>
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ extern "C" {
+   void ndbSetOwnVersion();
+ }
+--- old/ndb/src/cw/cpcd/CPCD.cpp
++++ new/ndb/src/cw/cpcd/CPCD.cpp
+@@ -24,6 +24,10 @@
+ 
+ #include "common.hpp"
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ extern const ParserRow<CPCDAPISession> commands[];
+ 
+ 
+--- old/ndb/src/cw/cpcd/Process.cpp
++++ new/ndb/src/cw/cpcd/Process.cpp
+@@ -27,6 +27,10 @@
+ #include <sys/resource.h>
+ #endif
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ void
+ CPCD::Process::print(FILE * f){
+   fprintf(f, "define process\n");
+--- old/ndb/tools/restore/Restore.hpp 	2007-04-06 00:41:47.000000000 +0200
++++ new/ndb/tools/restore/Restore.hpp   2007-04-06 00:42:22.000000000 +0200
+@@ -25,6 +25,10 @@
+ #include <ndb_version.h>
+ #include <version.h>
+ 
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ const int FileNameLenC = 256;
+ const int TableNameLenC = 256;
+ const int AttrNameLenC = 256;
+--- old/ndb/include/util/File.hpp
++++ new/ndb/include/util/File.hpp
+@@ -19,6 +19,10 @@
+
+ #include <ndb_global.h>
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ /**
+  * This class provides a file abstraction . It has operations
+  * to create, read, write and delete a file.
+--- old/ndb/src/common/portlib/NdbConfig.c
++++ new/ndb/src/common/portlib/NdbConfig.c
+@@ -20,6 +20,10 @@
+ #include <NdbMem.h>
+ #include <basestring_vsnprintf.h>
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ static const char *datadir_path= 0;
+
+ const char *

Added: mysql-dfsg-5.0/branches/unstable/debian/patches/89_ndb__staticlib.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/patches/89_ndb__staticlib.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/patches/89_ndb__staticlib.dpatch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 85_ndb__staticlib.dpatch by  <ch at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch to remove any dynamic link dependencies to libndbclient.so.0.0.0
+
+ at DPATCH@
+diff -Nur mysql-dfsg-5.0-5.0.50.orig/ndb/src/cw/cpcd/Makefile.in mysql-dfsg-5.0-5.0.50/ndb/src/cw/cpcd/Makefile.in
+--- mysql-dfsg-5.0-5.0.50.orig/ndb/src/cw/cpcd/Makefile.in	2007-10-19 17:18:18.000000000 +0200
++++ mysql-dfsg-5.0-5.0.50/ndb/src/cw/cpcd/Makefile.in	2007-11-26 20:09:02.000000000 +0100
+@@ -404,7 +404,7 @@
+ zlib_dir = @zlib_dir@
+ ndb_cpcd_SOURCES = main.cpp CPCD.cpp Process.cpp APIService.cpp Monitor.cpp common.cpp
+ LDADD_LOC = \
+-            $(top_builddir)/ndb/src/libndbclient.la      \
++            $(top_builddir)/ndb/src/.libs/libndbclient.a \
+             $(top_builddir)/dbug/libdbug.a \
+             $(top_builddir)/mysys/libmysys.a \
+             $(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
+diff -Nur mysql-dfsg-5.0-5.0.50.orig/ndb/src/mgmsrv/Makefile.in mysql-dfsg-5.0-5.0.50/ndb/src/mgmsrv/Makefile.in
+--- mysql-dfsg-5.0-5.0.50.orig/ndb/src/mgmsrv/Makefile.in	2007-10-19 17:18:25.000000000 +0200
++++ mysql-dfsg-5.0-5.0.50/ndb/src/mgmsrv/Makefile.in	2007-11-26 20:09:23.000000000 +0100
+@@ -431,7 +431,7 @@
+                -I$(top_srcdir)/ndb/src/mgmclient
+ 
+ LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CommandInterpreter.lo \
+-            $(top_builddir)/ndb/src/libndbclient.la \
++            $(top_builddir)/ndb/src/.libs/libndbclient.a \
+             $(top_builddir)/dbug/libdbug.a \
+             $(top_builddir)/mysys/libmysys.a \
+             $(top_builddir)/strings/libmystrings.a \
+diff -Nur mysql-dfsg-5.0-5.0.50.orig/ndb/tools/Makefile.in mysql-dfsg-5.0-5.0.50/ndb/tools/Makefile.in
+--- mysql-dfsg-5.0-5.0.50.orig/ndb/tools/Makefile.in	2007-10-19 17:18:29.000000000 +0200
++++ mysql-dfsg-5.0-5.0.50/ndb/tools/Makefile.in	2007-11-26 20:10:03.000000000 +0100
+@@ -559,7 +559,7 @@
+ 	-I$(top_srcdir)/ndb/test/include \
+ 	-I$(top_srcdir)/ndb/include/mgmapi \
+ 	-I$(top_srcdir)/ndb/include/kernel
+-LDADD = $(LDADD_LOC) $(top_builddir)/ndb/src/libndbclient.la \
++LDADD = $(LDADD_LOC) $(top_builddir)/ndb/src/.libs/libndbclient.a \
+ 	$(top_builddir)/dbug/libdbug.a \
+ 	$(top_builddir)/mysys/libmysys.a \
+ 	$(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@

Added: mysql-dfsg-5.0/branches/unstable/debian/po/POTFILES.in
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/POTFILES.in	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/POTFILES.in	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] mysql-server-5.0.templates

Added: mysql-dfsg-5.0/branches/unstable/debian/po/ar.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/ar.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/ar.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,223 @@
+# translation of templates.po to Arabic
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Ossama M. Khayat <okhayat at yahoo.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: templates\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2007-05-01 13:04+0300\n"
+"Last-Translator: Ossama M. Khayat <okhayat at yahoo.com>\n"
+"Language-Team: Arabic <support at arabeyes.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=6; plural=n==1 ? 0 : n==0 ? 1 : n==2 ? 2: n%100>=3 && "
+"n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+": n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "هل فعلاً تريد التثبيط؟"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "هناك ملف مسمى /var/lib/mysql/debian-*.flag موجود على هذا النظام."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"هذا الملف دلالة على أن نسخة أحدث من حزمة mysql-server تم تثبيتها مسبقاً."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"ليست هناك أية ضمانة أن النسخة التي تقوم بتثبيتها ستكون قادرة على استخدام "
+"قواعد البيانات الحالية."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "ملاحظة هامة لمستخدمي NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"كي تستخدم MySQL، يجب إضافة المُدخلات التالية الخاصة بالمستخدمين والمجموعات "
+"إلى النظام:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr "عليك أيضاً أن تقوم بالتأكد من صلاحيات مالك الملف /var/lib/mysql: "
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "إزالة جميع قواعد بيانات MySQL؟"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr "الدليل /var/lib/mysql الذي يحتوي قواعد بيانات MySQL ستتم إزالته."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"إن كنت تقوم بإزالة حزمة MySQL كي تقوم لاحقاً بتثبيت نسخة أحدث أو إن كانت حزمة "
+"mysql-server مختلفة تستخدمها، فيجب إبقاء البيانات."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "تشغيل خادم MySQL عند الإقلاع؟"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"يمكن تشغيل خادم MySQL آلياً وقت الإقلاع أو يدوياً باستخدام الأمر '/etc/init.d/"
+"mysql start'."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"مع أنه ليس إجبارياً، ولكن من المستحسن أن تقوم بتعيين كلمة مرور خاصة بمستخدم "
+"MySQL الإداري \"root\"."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "إن ترك الحقل فارغاً، فلن يتم تغيير كلمة المرور."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+#, fuzzy
+#| msgid "New password for the MySQL \"root\" user:"
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "كلمة المرور الجديدة لمستخد \"root\" الخاص بـMySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "تعذر تعيين كلمة مرور للمستخدم \"root\" الخاص بـMySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"حدث خطأ أثناء تعيين كلمة المرور لمستخدم MySQL الإداري. قد يكون هذا حدث بسبب "
+"أن حساب المستخدم له كلمة مرور معيّنة مسبقاً، أو بسبب مشكلة في الاتصال مع خادم "
+"MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+#, fuzzy
+#| msgid ""
+#| "You should check the account's password after tha package installation."
+msgid "You should check the account's password after the package installation."
+msgstr "يجب عليك التحقق من كلمة مرور الحساب عقب تثبيت الحزمة."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"الرجاء قراءة الملف /usr/share/doc/mysql-server-5.0/README.Debian للمزيد من "
+"المعلومات."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"هل تريد دعم اتصالات MySQL من الأجهزة التي تعمل على ديبيان \"sarge\" أو أقدم؟"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"في إصدارات عملاء MySQL القديمة من ديبيان، لم تكن كلمات المرور تحفظ بشكل آمن. "
+"ولقد حل هذه المشكلة بعدها، غير أن العملاء (مثل PHP) المتصلين من أجهزة تعمل "
+"على ديبيان Sarge 3.1 لن يكونوا قادرين على الاتصال باستخدام الحسابات الحديثة "
+"أو الحسابات التي تم تغيير كلمة مرورها."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/ca.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/ca.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/ca.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,344 @@
+# mysql-dfsg (debconf) translation to Catalan.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Aleix Badia i Bosch <abadia at ica.es> 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-4.1\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2004-01-31 19:20GMT\n"
+"Last-Translator: Aleix Badia i Bosch <abadia at ica.es>\n"
+"Language-Team: Debian L10n Catalan <debian-l10n-catalan at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+#, fuzzy
+#| msgid "Important note for NIS/YP users!"
+msgid "Important note for NIS/YP users"
+msgstr "Nota important pels usuaris de NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+#, fuzzy
+#| msgid "Should MySQL start on boot?"
+msgid "Start the MySQL server on boot?"
+msgstr "Voleu que el MySQL s'iniciï a l'arrencada ?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+#, fuzzy
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"El MySQL es pot executar a l'arrencada o només si executeu manualment '/etc/"
+"init.d/mysql start'. Seleccioneu 'sí' si voleu que s'inicialitzi "
+"automàticament."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+
+#, fuzzy
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Per utilitzar la base de dades de MySQL heu d'afegir un usuari i grup "
+#~ "equivalent al següent i assegurar-vos que el directori /var/lib/mysql "
+#~ "tingui els permisos correctes."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#, fuzzy
+#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
+#~ msgstr ""
+#~ "Feu una ullada al document: http://www.mysql.com/doc/en/Upgrade.html"
+
+#, fuzzy
+#~ msgid ""
+#~ "MySQL will only install if you have a non-numeric hostname that is "
+#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
+#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
+#~ "myhostname\"."
+#~ msgstr ""
+#~ "El MySQL només s'instal·la en cas de tenir un nom d'ordinador central que "
+#~ "no sigui numèric  i que es pugui resoldre a través del fitxer /etc/hosts. "
+#~ "Ex. si l'ordre \"hostname\" retorna \"myhostname\", llavors hi ha d'haver "
+#~ "una línia com la següent \"10.0.0.1 myhostname\"."
+
+#, fuzzy
+#~ msgid ""
+#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
+#~ "is used in the start/stop and cron scripts. Don't delete."
+#~ msgstr ""
+#~ "Es crea un nou usuari de mysql \"debian-sys-maint\". S'utilitza per les "
+#~ "seqüències d'inicialització i aturada del cron, no el suprimiu."
+
+#, fuzzy
+#~ msgid ""
+#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
+#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
+#~ "there, never only the password!"
+#~ msgstr ""
+#~ "Recordeu posar una contrasenya al superusuari del MySQL. Si utilitzeu un "
+#~ "fitxer /root/.my.cnf, escriviu sempre allà les línies \"user\" i "
+#~ "\"password\".; mai només la contrasenya. Per a més informació feu una "
+#~ "ullada a /usr/share/doc/mysql-server/README.Debian."
+
+#, fuzzy
+#~ msgid ""
+#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
+#~ "mysql-server package?"
+#~ msgstr ""
+#~ "Voleu suprimir totes les bases de dades en purgar el paquet mysql-server ?"
+
+#~ msgid ""
+#~ "Networking is disabled by default for security reasons. You can enable it "
+#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
+#~ msgstr ""
+#~ "La xarxa està inhabilitada per defecte per a raons de seguretat. La podeu "
+#~ "habilitar descomentant l'opció de skip-networking del fitxer /etc/mysql/"
+#~ "my.cnf."
+
+#~ msgid "security and update notice"
+#~ msgstr "Avís de seguretat i actualització"
+
+#~ msgid "Please run mysql_fix_privilege_tables !"
+#~ msgstr "Executeu mysql_fix_privilege_tables"
+
+#~ msgid ""
+#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
+#~ "other than root and mysql with mysql."
+#~ msgstr ""
+#~ "S'asseguren els permisos de seguretat de /var/lib/mysql canviant a mysql "
+#~ "tots els GIDs diferents a root i mysql."
+
+#~ msgid ""
+#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
+#~ msgstr ""
+#~ "Per habilitar el suport de SSL podeu seguir les instruccions de /usr/"
+#~ "share/doc/mysql-server/"
+
+#~ msgid "mysql_fix_privileges_tables will be executed"
+#~ msgstr "s'executa mysql_fix_privileges_tables"
+
+#~ msgid ""
+#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
+#~ "system. To make use of it, some new fields must be added to the tables "
+#~ "in  the \"mysql\" database. This is done by the "
+#~ "mysql_fix_privilege_tables script during this upgrade regardless of if "
+#~ "the server is currently running or not!"
+#~ msgstr ""
+#~ "Les últimes versions de MySQL tenen un sistema de privilegis més "
+#~ "elaborat. Per utilitzar-lo cal afegir nous camps a les taules de la base "
+#~ "de dades \"mysql\". Aquesta tasca la realitza la seqüència "
+#~ "mysql_fix_privilege_tables durant l'actualització independentment de si "
+#~ "el servidor s'està executant o no!"
+
+#~ msgid ""
+#~ "This script is not supposed to give any user more rights that he had "
+#~ "before, if you encounter such a case, please contact me."
+#~ msgstr ""
+#~ "Aquesta seqüència no assigna privilegis d'usuari diferents als que ja "
+#~ "tenia, en cas que us trobéssiu en aquesta situació, poseu-vos en contacte "
+#~ "amb mi."
+
+#~ msgid ""
+#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
+#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
+#~ "remove everything including the configuration) somewhen? (default is not)"
+#~ msgstr ""
+#~ "Voleu suprimir tots els continguts de /var/lib/mysql quan es purgui el "
+#~ "paquet mysql-server amb l'ordre \"dpkg --purge mysql-server\". (ex. "
+#~ "suprimir-ho tot inclòs la configuració) ? (per defecte no)"
+
+#~ msgid "Make MySQL reachable via network?"
+#~ msgstr "Voleu fer accessible el MySQL via xarxa ?"
+
+#~ msgid ""
+#~ "Should MySQL listen on a network reachable TCP port? This is not "
+#~ "necessary for use on a single computer and could be a security problem."
+#~ msgstr ""
+#~ "Voleu que el MySQL escolti a un port TCP accessible des de la xarxa ? "
+#~ "Aquesta opció no és imprescindible en ordinadors aïllats i podria "
+#~ "provocar un problema de seguretat."
+
+#~ msgid "Enable chroot mode?"
+#~ msgstr "Permetre el mode chroot ?"
+
+#~ msgid ""
+#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
+#~ "that users cannot modify any files outside this directory. This improves "
+#~ "resistence against crackers, too, as they are not able to modify system "
+#~ "files."
+#~ msgstr ""
+#~ "El MySQL es pot executar en una entorn tancat al directori /var/lib/"
+#~ "mysql_jail perquè els usuaris no puguin modificar cap fitxer fora del "
+#~ "directori.Aquesta opció també augmenta la seguretat envers els crackers, "
+#~ "jaque no poden modificar els fitxers del sistema."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/cs.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/cs.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/cs.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,311 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-05-08 20:05+0200\n"
+"PO-Revision-Date: 2008-05-12 19:23+0200\n"
+"Last-Translator: Miroslav Kure <kurem at debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Opravdu pokračovat v degradaci?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "V systému existuje soubor /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr "To znamená, že již byl nainstalován balík mysql-server s vyšší verzí."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Neexistuje žádná záruka, že momentálně instalovaná verze bude umět pracovat "
+"se stávajícími databázemi."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Důležitá poznámka pro uživatele NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Abyste mohli MySQL používat, musíte v systému založit následující uživatele "
+"a skupiny:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Také byste měli zkontrolovat vlastníka a oprávnění adresáře /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Odstranit všechny MySQL databáze?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Adresář /var/lib/mysql, ve kterém se nachází MySQL databáze, bude odstraněn."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Jestliže odstraňujete balík MySQL za účelem instalace novější verze MySQL, "
+"nebo pokud tato data souběžně využívá jiný balík mysql-server, měli byste "
+"data ponechat."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Spustit MySQL server při startu systému?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL se může spouštět automaticky při startu systému, nebo ručně příkazem „/"
+"etc/init.d/mysql start“."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nové heslo MySQL uživatele „root“:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Přestože to není nezbytné, je silně doporučeno nastavit heslo u "
+"správcovského MySQL účtu „root“."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Ponecháte-li pole prázdné, heslo se nezmění."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Zopakujte heslo pro MySQL uživatele „root“:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Nelze nastavit heslo MySQL uživatele „root“"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Během nastavování hesla pro správcovského uživatele MySQL se vyskytla chyba. "
+"To se mohlo stát třeba proto, protože uživatel již měl heslo nastaveno, nebo "
+"protože nastal problém v komunikaci s MySQL serverem."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Po instalaci balíku byste měli heslo ověřit."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Více informací naleznete v /usr/share/doc/mysql-server-5.0/README.Debian."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Chyba zadávání hesla"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Zadaná hesla nesouhlasí. Zkuste to prosím znovu."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Podporovat MySQL připojení z počítačů používajících Debian Sarge nebo starší?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Způsob, jakým se dříve ukládala hesla, nebyl příliš bezpečný. To se nyní "
+"zlepšilo, ale nevýhodou je, že se klienti z Debianu 3.1 Sarge (např. PHP) "
+"nebudou moci připojit na nové účty, nebo na účty, u nichž se heslo změnilo."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Abyste mohli mysql používat, musíte do následujících souborů přidat "
+#~ "ekvivalentního uživatele a skupinu a zajistit, že /var/lib/mysql má "
+#~ "správná práva (uid/gid se mohou lišit)."
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr "Odstranit databáze používané všemi verzemi MySQL?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr "Nezadáte-li heslo, žádné změny se s účtem neprovedou."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "Po skončení instalace byste měli ověřit, že je účet chráněn heslem (více "
+#~ "informací naleznete v souboru README.Debian)."
+
+#~ msgid "Cannot upgrade if ISAM tables are present!"
+#~ msgstr "Aktualizace nelze provést pokud jsou přítomny tabulky ISAM!"
+
+#~ msgid ""
+#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
+#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
+#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
+#~ "The installation of mysql-server-5.0 will now abort. In case your old "
+#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
+#~ "those tables."
+#~ msgstr ""
+#~ "Poslední verze MySQL již nemohou používat starý formát tabulek ISAM a "
+#~ "před aktualizací je nutné převést tyto tabulky např. do formátu MyISAM "
+#~ "pomocí „mysql_convert_table_format“ nebo „ALTER TABLE x ENGINE=MyISAM“. "
+#~ "Instalace mysql-server-5.0 se nyní přeruší. V případě, že se mezitím "
+#~ "odinstaloval původní mysql-server-4.1, jednoduše jej znovu nainstalujte a "
+#~ "tabulky převeďte."
+
+#~ msgid "Update Hints"
+#~ msgstr "Poznámky k aktualizaci"
+
+#~ msgid ""
+#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be  "
+#~ "corrupted! This script also enhances the privilege tables but is not  "
+#~ "supposed to give any user more rights that he had before,"
+#~ msgstr ""
+#~ "Po aktualizaci ještě musíte spustit „mysql_upgrade“, protože jinak by "
+#~ "se tabulky mohly narušit! Tento skript také rozšiřuje tabulky privilegií, "
+#~ "ovšem neměl by uživatelům přidat více práv, než měli dosud."
+
+#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
+#~ msgstr "Také si přečtěte http://www.mysql.com/doc/en/Upgrade.html"
+
+#~ msgid ""
+#~ "MySQL will only install if you have a non-numeric hostname that is "
+#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
+#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
+#~ "myhostname\"."
+#~ msgstr ""
+#~ "MySQL se nainstaluje pouze v případě, že používáte nenumerické jméno "
+#~ "počítače, které se dá přeložit přes soubor /etc/hosts. Např. když příkaz "
+#~ "„hostname“ vrátí „diamond“, tak v /etc/hosts musí existovat obdobný "
+#~ "řádek jako „10.0.0.1 diamond“."
+
+#~ msgid ""
+#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
+#~ "is used in the start/stop and cron scripts. Don't delete."
+#~ msgstr ""
+#~ "Bude vytvořen nový mysql uživatel \"debian-sys-maint\". Tento mysql účet "
+#~ "se používá ve startovacích, ukončovacích a cronových skriptech. Nemažte "
+#~ "jej."
+
+#~ msgid ""
+#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
+#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
+#~ "there, never only the password!"
+#~ msgstr ""
+#~ "Nezapomeňte nastavit heslo pro účet administrátora MySQL! Používáte-li /"
+#~ "root/.my.cnf, vždy zde zadejte jak řádek „user“, tak řádek „password“. "
+#~ "Nikdy zde nezadávejte jenom heslo!"
+
+#~ msgid ""
+#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
+#~ "by all MySQL versions, not necessarily only the one you are about to "
+#~ "purge?"
+#~ msgstr ""
+#~ "Mám odstranit kompletní adresářový strom /var/lib/mysql, který se používá "
+#~ "pro všechny verze MySQL, tedy ne nutně pouze pro verzi, kterou se "
+#~ "chystáte vyčistit?"

Added: mysql-dfsg-5.0/branches/unstable/debian/po/da.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/da.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/da.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,354 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Claus Hindsgaul <claus_h at image.dk>, 2005, 2006.
+# Claus Hindsgaul <claus.hindsgaul at gmail.com>, 2006, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-4.1\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2007-05-30 22:41+0200\n"
+"Last-Translator: Claus Hindsgaul <claus.hindsgaul at gmail.com>\n"
+"Language-Team: Danish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Ønsker du virkelig at fortsætte nedgraderingen?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"Der er en fil med navnet  /var/lib/mysql/debian-*.flag på dette system."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Sådan en fil tyder på at der tidligere har været installeret en højere "
+"version af mysql-server-pakken."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Det kan ikke garanteres at den version, du er ved at installere, kan benytte "
+"data fra de eksisterende databaser."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Vigtig oplysning til NIS/YP-brugere"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Nedenstående linjer for brugere og grupper skal tilføjes dette system for at "
+"benytte MySQL:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Du bør også tjekke filrettighederne og ejerskabet af mappen /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Fjern alle MySQL-databaser?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Mappen /var/lib/mysql, der indeholder MySQL-databaserne, er ved at blive "
+"fjernet."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Hvis du fjerner MySQL-pakken for senere at installere en nyere version, "
+"eller hvis en anden mysql-server-pakke allerede benytter den, bør dataene "
+"bevares."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Start MySQL-serveren under systemopstart?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL-serveren kan enten startes op automatisk under systemopstarten, eller "
+"manuelt med kommandoen '/etc/init.d/mysql start'."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Ny adgangskode for MySQL's \"root\"-bruger:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Selvom det ikke kræves, anbefales det kraftigt, at du sætter en adgangskode "
+"for MySQL's administrationsbruger \"root\"."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Hvis du lader dette felt stå tomt, vil adgangskoden ikke blive ændret."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+#, fuzzy
+#| msgid "New password for the MySQL \"root\" user:"
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Ny adgangskode for MySQL's \"root\"-bruger:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Kunne ikke sætte adgangskoden for MySQL's \"root\"-bruger"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Der opstod en fejl, da adgangskoden for MySQL's administrationsbruger blev "
+"forsøgt ændret. Dette kan være sket, fordi brugeren allerede har en "
+"adgangskode, eller fordi der var problemer med at kommunikere med MySQL-"
+"serveren."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Du bør tjekke kontoens adgangskode efter pakkeinstallationen."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Se filen /usr/share/doc/mysql-server-5.0/README.Debian for yderligere "
+"oplysninger."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Understøt MySQL-forbindelser fra maskiner, der kører Debian \"Sarge\" eller "
+"ældre?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Gamle udgaver af MySQL-klienter på Debian gemte ikke adgangskoderne sikkert. "
+"Dette er blevet forbedret siden da, men klienter (f.eks. PHP) fra maskiner, "
+"der kører Debian 3.1 Sarge vil ikke kunne forbinde til nyere konti eller "
+"konti, hvis adgangskode er blevet ændret."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "For at kunne bruge mysql skal du installere en bruger og en gruppe, der "
+#~ "svarer til nedenstående, og sikre dig at /var/lib/mysql har de rigtige "
+#~ "adgangsrettigheder (uid/gid kan afvige)."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr "Fjern de databaser, der benyttes af samtlige MySQL-versioner?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr "Hvis du ikke angiver en adgangskode, vil kontoen ikke blive ændret."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "Når installationen afsluttes, bør du tjekke at kontoen er ordentligt "
+#~ "beskyttet med en adgangskode (se README.Debian for yderligere "
+#~ "oplysninger)."
+
+#~ msgid "Cannot upgrade if ISAM tables are present!"
+#~ msgstr "Kan ikke opgradere hvis der er ISAM-tabeller!"
+
+#~ msgid ""
+#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
+#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
+#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
+#~ "The installation of mysql-server-5.0 will now abort. In case your old "
+#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
+#~ "those tables."
+#~ msgstr ""
+#~ "Nyere versioner af MySQL kan ikke længere benytte det gamle ISAM-"
+#~ "tabelformat, og det er derfor nødvendigt at konvertere dine tabeller til "
+#~ "f.eks. MyISAM forud for opgraderingen med \"mysql_convert_table_format\" "
+#~ "eller \"ALTER TABLE x ENGINE=MyISAM\". Installationen af mysql-server-5.0 "
+#~ "afbrydes nu. Skulle din gamle mysql-server-4.1 alligevel bliver "
+#~ "afinstalleret, så geninstallér den blot og konverter tabellerne."
+
+#~ msgid "Update Hints"
+#~ msgstr "Opdateringstips"
+
+#~ msgid ""
+#~ "You have to run \"mysql_upgrade\" after the upgrade, else tables can be  "
+#~ "corrupted! This script also enhances the privilege tables but is not  "
+#~ "supposed to give any user more rights that he had before,"
+#~ msgstr ""
+#~ "Du skal køre \"mysql_upgrade\" efter opgraderingen, da tabellerne eller "
+#~ "kan blive ødelagt! Dette script forbedrer også rettighedstabellerne, men "
+#~ "burde ikke give nogen bruger flere rettigheder, end han havde tidligere,"
+
+#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
+#~ msgstr "Læs også http://www.mysql.com/doc/en/Upgrade.html"
+
+#~ msgid "Install Hints"
+#~ msgstr "Installationstips"
+
+#~ msgid ""
+#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
+#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
+#~ "have manually be restored."
+#~ msgstr ""
+#~ "Ved opgraderinger fra MySQL 3.23, der fulgte med Debian Woody, kan de "
+#~ "symbolske /var/lib/mysql or /var/log/mysql blive fjernet ved et uheld, og "
+#~ "må genskabes manuelt."
+
+#~ msgid ""
+#~ "MySQL will only install if you have a non-numeric hostname that is "
+#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
+#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
+#~ "myhostname\"."
+#~ msgstr ""
+#~ "MySQL vil kun blive installeret, hvis du har et ikke-numerisk værtsnavn, "
+#~ "som kan slås op i filen /ets/hosts. Hvis f.eks. kommandoen \"hostname\" "
+#~ "svarer med \"mitvaertsnavn\", skal du have en linje a'la \"10.0.0.1 "
+#~ "mitvaertsnavn\" i /etc/hosts."
+
+#~ msgid ""
+#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
+#~ "is used in the start/stop and cron scripts. Don't delete."
+#~ msgstr ""
+#~ "Det vil blive oprettet en ny mysql-bruger, \"debian-sys-maint\". Denne "
+#~ "mysql-konto bruges i start/stop-cron-scripterne. Slet den ikke."
+
+#~ msgid ""
+#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
+#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
+#~ "there, never only the password!"
+#~ msgstr ""
+#~ "Husk at sætte en ADGANGSKODE for MySQLs root-bruger! Hvis du bruger en /"
+#~ "etc/.my.cnf, så skriv altid \"user\"- og \"password\"-linjer ind her, "
+#~ "ikke kun adgangskoden!"
+
+#~ msgid ""
+#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
+#~ "by all MySQL versions, not necessarily only the one you are about to "
+#~ "purge?"
+#~ msgstr ""
+#~ "Skal jeg fjerne hele mappetræet /var/lib/mysql, som benyttes af alle "
+#~ "MySQL-versioner, ikke kun den version, du er ved at slette?"
+
+#~ msgid ""
+#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
+#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
+#~ "script is not supposed to give any user more rights that he had before,"
+#~ msgstr ""
+#~ "En sjælden gang imellem, f.eks. ved nye hovedversioner, sker det at "
+#~ "rettighedssystemet forbedres. For at gøre brug af dette, skal "
+#~ "mysql_fix_privilege_tables køres manuelt. Scriptet vil ikke give nogen "
+#~ "bruger flere rettigheder, end vedkommende havde tidligere,"

Added: mysql-dfsg-5.0/branches/unstable/debian/po/de.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/de.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/de.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,235 @@
+# translation of mysql-dfsg-5.0_5.0.51a-5_de to German
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Alwin Meschede <ameschede at gmx.de>, 2006, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0_5.0.51a-5_de\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-04-27 13:54+0200\n"
+"PO-Revision-Date: 2008-04-30 10:40+0200\n"
+"Last-Translator: Alwin Meschede <ameschede at gmx.de>\n"
+"Language-Team: Deutsch <debian-l10n-de at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Möchten Sie wirklich eine ältere Version einspielen?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"Auf diesem System existiert eine Datei mit dem Namen /var/lib/mysql/debian-*."
+"flag"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Diese Datei ist ein Hinweis darauf, dass früher ein MySQL-Server-Paket mit "
+"einer höheren Version installiert war."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Es kann nicht garantiert werden, dass die gegenwärtig zu installierende "
+"Version dessen Daten benutzen kann."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Wichtige Anmerkung für NIS/YP-Benutzer!"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Um MySQL benutzen zu können, sollten die folgenden Benutzer und Gruppen dem "
+"System hinzugefügt werden:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Sie sollten außerdem Besitzer und Zugriffsrechte des Verzeichnisses /var/lib/"
+"mysql überprüfen:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Alle MySQL-Datenbanken entfernen?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Das Verzeichnis /var/lib/mysql mit den MySQL-Datenbanken soll entfernt "
+"werden."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Falls geplant ist, nur eine höhere Version von MySQL zu installieren oder "
+"ein anderes mysql-server-Paket dieses bereits benutzt, sollten die Daten "
+"behalten werden."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Soll MySQL automatisch beim Booten starten?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"Der MySQL-Dienst kann entweder automatisch beim Systemstart oder manuell "
+"durch Eingabe des Befehls »/etc/init.d/mysql start« gestartet werden."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Neues Passwort für den MySQL »root«-Benutzer:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Obwohl es nicht zwingend erforderlich ist, wird nachdrücklich empfohlen für "
+"den administrativen MySQL »root«-Benutzer ein Passwort zu setzen."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Wenn dieses Feld freigelassen wird, wird das Passwort nicht geändert."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Wiederholen Sie das Passwort für den MySQL »root«-Benutzer:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Konnte für den MySQL-»root«-Benutzer kein Passwort setzen"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Beim setzen des Passworts für den administrativen MySQL-Benutzer ist ein "
+"Fehler aufgetreten. Dies könnte daran liegen, dass der Benutzer bereits ein "
+"Passwort hat oder dass es ein Problem mit der Kommunikation mit dem MySQL-"
+"Server gibt."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Sie sollten das Passwort des administrativen Benutzers nach der "
+"Paketinstallation prüfen."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Für weitere Informationen lesen Sie /usr/share/doc/mysql-server-5.0/README."
+"Debian"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Passwort-Eingabefehler"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+"Die beiden von Ihnen eingegebenen Passwörter stimmten nicht "
+"überein. Bitte versuchen Sie es noch einmal."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Sollen MySQL-Verbindungen von Rechnern mit Debian »Sarge« oder älter "
+"unterstützt werden?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Alte Versionen der MySQL-Clients für Debian speicherten Passwörter nicht "
+"sehr sicher. Dies wurde verbessert, allerdings werden Clients (z. B. PHP) "
+"von Hosts mit Debian 3.1 Sarge sich nicht mehr mit MySQL-Konten verbinden "
+"können, die neu angelegt werden oder deren Passwort geändert wird. Siehe "
+"auch /usr/share/doc/mysql-server-5.0/README.Debian."
+

Added: mysql-dfsg-5.0/branches/unstable/debian/po/es.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/es.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/es.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,361 @@
+# mysql-dfsg-5 translation to spanish
+# Copyright (C) 2005-2007 Software in the Public Interest, SPI Inc.
+# This file is distributed under the same license as the XXXX package.
+#
+# Changes:
+# - Initial translation
+#       Jesus Aneiros, 2006
+# - Updated
+#       Javier Fernandez-Sanguino, 2006-2007
+# - Revision
+#       Nacho Barrientos Arias
+#       Fernando Cerezal
+#       David Martínez Moreno
+#       Ricardo Mones
+#       Carlos Galisteo
+#       Javier Fernandez-Sanguino
+#
+#
+#  Traductores, si no conoce el formato PO, merece la pena leer la 
+#  documentación de gettext, especialmente las secciones dedicadas a este
+#  formato, por ejemplo ejecutando:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+#
+# - El proyecto de traducción de Debian al español
+#   http://www.debian.org/intl/spanish/
+#   especialmente las notas y normas de traducción en
+#   http://www.debian.org/intl/spanish/notas
+#
+# - La guía de traducción de po's de debconf:
+#   /usr/share/doc/po-debconf/README-trans
+#   o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+# Si tiene dudas o consultas sobre esta traducción consulte con el último
+# traductor (campo Last-Translator) y ponga en copia a la lista de
+# traducción de Debian al español (<debian-l10n-spanish at lists.debian.org>)
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0_5.0.24-3\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-05-08 20:05+0200\n"
+"PO-Revision-Date: 2008-07-01 00:47+0200\n"
+"Last-Translator: Javier Fernández-Sanguino <jfs at debian.org>\n"
+"Language-Team: Debian l10 Spanish <debian-l10n-spanish at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-POFile-SpellExtra: YP PHP lib doc share init server start flag README\n"
+"X-POFile-SpellExtra: usr mysql var NIS Sarge root MySQL desactualización\n"
+"X-POFile-SpellExtra: introdúzcalas\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "¿Desea realmente continuar con la desactualización?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"Existe un archivo con el nombre /var/lib/mysql/debian-*.flag en este sistema."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Este fichero indica que se instaló previamente una versión superior del "
+"paquete mysql-server."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"No se puede garantizar que la versión que está instalando pueda usar la base "
+"de datos actual."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Nota importante para los usuarios de NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Deben añadirse las siguientes entradas para usuarios y grupos en el sistema "
+"para poder utilizar MySQL:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"También debería comprobar los permisos y el propietario del directorio /var/"
+"lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "¿Desea eliminar todas las bases de datos MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"El directorio /var/lib/mysql contiene bases de datos MySQL que van a "
+"eliminarse."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Debería mantener los datos si tiene planificado instalar una versión de "
+"MySQL más reciente o si hay un paquete «mysql-server» distinto que los está "
+"utilizando."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "¿Debería ejecutarse el servidor MySQL al iniciarse el sistema?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"El servidor MySQL puede iniciarse en el momento de arranque del sistema o "
+"manualmente si escribe la orden «/etc/init.d/mysql start»."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nueva contraseña para el usuario «root» de MySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Se recomienda que configure una contraseña para el usuario "
+"«root» (administrador) de MySQL, aunque no es obligatorio."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "No se modificará la contraseña si deja el espacio en blanco."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Repita la contraseña para el usuario «root» de MySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "No se pudo fijar la contraseña para el usuario «root» de MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Se produjo un error mientras intentaba fijar la contraseña para el usuario "
+"administrador de MySQL. Esto puede haber sucedido porque la cuenta ya tenía "
+"una contraseña o porque se produjo un error de comunicación con el servidor "
+"MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Debería comprobar la contraseña de la cuenta después de la instalación del "
+"paquete."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Consulte /usr/share/doc/mysql-server-5.0/README.Debian para más información."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Error en la introducción de la contraseña"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Las contraseñas que introdujo no coinciden. Por favor, introdúzcalas de nuevo."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr "¿Soportar las conexiones MySQL establecidas desde sistemas que ejecutan Debian Sarge o versiones anteriores?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"No era muy segura la forma en la que se almacenaban las contraseñas en "
+"versiones anteriores del cliente de MySQL en Debian. Este problema se ha "
+"mejorado posteriormente con el inconveniente, sin embargo, de que clientes "
+"(por ejemplo, PHP) en sistemas que ejecutan Debian 3.1 «Sarge» no podrán "
+"conectarse a cuentas que son nuevas o a las que se le haya cambiado la "
+"contraseña."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Para utilizar mysql debe instalar un usuario y grupo equivalente al "
+#~ "siguiente y asegurarse de que /var/lib/mysql tiene los permisos correctos "
+#~ "(los valores del «uid» y del «gid» pueden ser diferentes)."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr ""
+#~ "¿Eliminar las bases de datos utilizadas por todas las versiones de MySQL?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr ""
+#~ "No se hará ningún cambio en la cuenta si no introduce una contraseña."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "Debería confirmar que la contraseña está correctamente protegida con una "
+#~ "contraseña cuando termine la instalación (consulte el fichero README."
+#~ "Debian si desea más información)."
+
+#~ msgid "Install Hints"
+#~ msgstr "Sugerencias para la instalación"
+
+#~ msgid ""
+#~ "On upgrades from MySQL 3.23, as shipped with Debian Woody, symlinks in "
+#~ "place of /var/lib/mysql or /var/log/mysql gets accidently removed and "
+#~ "have manually be restored."
+#~ msgstr ""
+#~ "Al actualizar a la versión de MySQL 3.23, la vrsión proporcionada en "
+#~ "Debian Woody, se eliminan de manera accidental, los enlaces simbólicos a «/"
+#~ "var/lib/mysql» o «/var/log/mysql» y tienen que restaurarse manualmente."
+
+#~ msgid ""
+#~ "MySQL will only install if you have a non-numeric hostname that is "
+#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
+#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
+#~ "myhostname\"."
+#~ msgstr ""
+#~ "Sólo se instalará MySQL si tiene un nombre de equipo que no sea una "
+#~ "dirección IP y pueda resolverse a través del archivo /etc/hosts. Por "
+#~ "ejemplo, si la orden «hostname» devuelve «MiNombreEquipo» entonces deberá "
+#~ "existir una línea «10.0.0.1 MiNombreEquipo» en dicho archivo."
+
+#~ msgid ""
+#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
+#~ "is used in the start/stop and cron scripts. Don't delete."
+#~ msgstr ""
+#~ "Se creará un nuevo usuario «debian-sys-maint». Esta cuenta de mysql se "
+#~ "utilizará en los scripts de inicio y parada y en los scripts «cron». No la "
+#~ "elimine."
+
+#~ msgid ""
+#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
+#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
+#~ "there, never only the password!"
+#~ msgstr ""
+#~ "¡Por favor, recuerde crear una CONTRASEÑA para el usuario «root» de MySQL! "
+#~ "¡Si utiliza /root/.my.cnf debe escribir las líneas «user» y «password» en "
+#~ "dicho archivo, no incluya sólo la contraseña!"
+
+#~ msgid ""
+#~ "Should I remove the complete /var/lib/mysql directory tree which is used "
+#~ "by all MySQL versions, not necessarily only the one you are about to "
+#~ "purge?"
+#~ msgstr ""
+#~ "¿Debería eliminar el árbol de directorio /var/lib/mysql completo? Tenga "
+#~ "en cuenta que lo utilizan todas las versiones de MySQL y no sólo la que "
+#~ "está a punto de purgar."
+
+#~ msgid "Cannot upgrade if ISAM tables are present!"
+#~ msgstr "¡No se puede actualizar si ya hay tablas ISAM!"
+
+#~ msgid ""
+#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
+#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
+#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
+#~ "The installation of mysql-server-5.0 will now abort. In case your old "
+#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
+#~ "those tables."
+#~ msgstr ""
+#~ "Las versiones recientes de MySQL ya no soportan el antiguo formato de "
+#~ "tabla ISAM. Antes de realizar la actualización es necesario convertir sus "
+#~ "tablas a por ejemplo, MyISAM, usando «mysql_convert_table_format» o «ALTER "
+#~ "TABLE x ENGINE=MyISAM». Se va a interrumpir ahora la instalación de mysql-"
+#~ "server-5.0. Si aún así su mysql-server-4.1 se elimina aún así, puede "
+#~ "reinstalarlo para convertir ese tipo de tablas."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/eu.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/eu.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/eu.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,219 @@
+# translation of eu.po to Euskara
+# Piarres BEobide <pi at beobide.net>, 2006,2007.
+# Piarres Beobide <pi at beobide.net>, 2008.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Aitor Ibañez <aitiba at gmail.com> 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: eu\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2008-05-18 23:36+0200\n"
+"Last-Translator: Piarres Beobide <pi at beobide.net>\n"
+"Language-Team: Euskara <debian-l10n-basque at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Benetan bertsio zaharragora itzuli nahi duzu?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"/var/lib/mysql/debian-*.flag deituriko fitxategia, dagoeneko, existitzen da "
+"zure sisteman."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Honek aurretik bertsio berriagoko mysql-zerbitzari bat instalatu dela "
+"adierazten du."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Ez dago garantiarik, erabiltzen ari zaren bertsioak, momentuko databasea "
+"erabiltzeko gai izango denik."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "NIS/YP erabiltzaileentzat ohar garrantzitsua"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"MySql erabili ahal izateko, hurrengo sarrerak gehitu beharko lirateke "
+"sistemara, erabiltzaile eta taldeentzat:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr "/var/lib/mysql karpetaren baimenak eta jabea egiaztatu behar zenituzke"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "MySQL database guztiak ezabatu?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"/var/lib/mysql karpeta, MySQLko databaseak dituena, ezabatzeko zorian dago."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"MySQL bertsio berriago bat instalatu behar bada edo beste mysql-server "
+"pakete bat berau erabiltzen ari bada, datuak mantendu egingo dira."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Sistema abiaraztean MySQL abiarazi behar al da?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL abiaraztean automatikoki abiarazi daiteke edo eskuz '/etc/init.d/mysql "
+"start' eginaz."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "MySQL \"root\" erabiltzailearen pasahitz berria:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Oso gomendagarria da MySQL administratzaile \"root\" erabiltzaileari "
+"pasahitz bat ezartzea."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Gune hau hutsa utziz gero, pasahitza ez da aldatuko."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Errepikatu MySQL \"root\" erabiltzailearen pasahitz berria:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Ezinda MySQL \"root\" erabiltzailearen pasahitza ezarri"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Errore bat gertatu da MySQL administratzaile kontuaren pasahitza ezartzean.  "
+"Hau erabiltzaileak dagoeneko pasahitz bat duelako edo MySQL "
+"zerbitzariarekiko konexioan erroreak daudelako gertatu daiteke."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Kontuaren pasahitzari gainbegiratu bota beharko zenioke, paketea instalatu "
+"ostean."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Mesedez, irakurri /usr/share/doc/mysql-server-5.0/README.Debian fitxategia "
+"informazio gehiagorako."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Pasahitz sarrera errorea"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Idatzitako bi pasahitzak ez dira berdinak. Mesedez saiatu berriro."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Debian \"sarge\" edo zaharragoak erabiltzen duten ostalarietatik MySQL "
+"konexioak onartu?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Debian-en MySQL bezeroek bertsio zaharragoeta pasahitzak ez ziren modu "
+"seguruan gordetzen. Hau hobetua izan da baina Debian 3.1 Sarge "
+"erabiltzaileak ezingo dira kontu berri edo pasahitza aldatu duten kontuetara "
+"konektatu."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/fi.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/fi.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/fi.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,209 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0_5.0.45-1\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-05-08 20:05+0200\n"
+"PO-Revision-Date: 2008-06-16 21:50+0200\n"
+"Last-Translator: Esko Arajärvi <edu at iki.fi>\n"
+"Language-Team: Finnish <debian-l10n-finnish at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Country: FINLAND\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Haluatko varmasti varhentaa versiota?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Järjestelmässä on tiedosto nimeltä /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Tiedoston olemassaolo merkitsee, että paketin mysql-server uudempi versio on "
+"ollut asennettuna aiemmin."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Ei ole takuita, että versio jota ollaan asentamassa pystyy käyttämään "
+"olemassa olevia tietokantoja."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Tärkeä tiedotus NIS/YP-käyttäjille"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Järjestelmään tulisi lisätä äyttäjille ja ryhmille seuraavat rivit, jotta "
+"MySQL:ää voidaan käyttää:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr "Myös hakemiston /var/lib/mysql oikeudet ja omistaja tulisi tarkistaa:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Poistetaanko kaikki MySQL-tietokannat?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"MySQL-tietokannat sisältävää hakemistoa /var/lib/mysql ollaan poistamassa."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Tiedot tulisi säilyttää, jos MySQL-pakettia ollaan poistamassa tarkoituksena "
+"asentaa myöhemmin uudempi versio, tai jos toinen mysql-server-paketti "
+"käyttää niitä jo."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Käynnistetäänkö MySQL-palvelin käynnistettäessä tietokone?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL-palvelin voidaan käynnistää automaattisesti käynnistettäessä tietokone "
+"tai käsin komennolla ”/etc/init.d/mysql start”."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "MySQL:n pääkäyttäjän uusi salasana:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"On hyvin suositeltavaa asettaa MySQL:ää ylläpitävän pääkäyttäjän salasana, "
+"vaikka se ei olekaan pakollista."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Jos kenttä jätetään tyhjäksi, salasanaa ei vaihdeta."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Toista MySQL:n pääkäyttäjän salasana:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Salasanan asetus MySQL:n pääkäyttäjälle ei onnistunut"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Asetettaessa salasanaa MySQL:n ylläpitäjälle tapahtui virhe. Tämä saattaa "
+"johtua siitä, että tunnuksella on jo salasana tai viestintäongelmista MySQL-"
+"palvelimen kanssa."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Tarkista tunnuksen salasana paketin asennuksen jälkeen."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Tiedostosta /usr/share/doc/mysql-server-5.0/README.Debian löytyy lisätietoja "
+"(englanniksi)."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Virhe salasanojen syötössä"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Annetut kaksi salasanaa eivät olleet sama. Yritä uudelleen."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Tuetaanko MySQL-yhteyksiä koneilta, jotka ajavat Debianin jakelua ”sarge” "
+"tai vanhempia?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Vanhemmissa Debianin MySQL-asiakkaissa salasanoja ei tallennettu "
+"turvallisesti. Tilanne on parantunut sen jälkeen. Asiakkaat (kuten PHP), "
+"joita ajetaan Debianin versiossa 3.1 Sarge, eivät kuitenkaan pysty ottamaan "
+"yhteyttä uusiin tunnuksiin tai tunnuksiin, joiden salasana on vaihdettu."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/fr.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/fr.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/fr.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,229 @@
+# translation of fr.po to French
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Christian Perrier <bubulle at debian.org>, 2004, 2006, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-04-27 13:54+0200\n"
+"PO-Revision-Date: 2008-04-29 20:37+0200\n"
+"Last-Translator: Christian Perrier <bubulle at debian.org>\n"
+"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"debian.org>\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: Plural-Forms: nplurals=2; plural=n>1;\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Faut-il vraiment revenir à la version précédente ?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Un fichier /var/lib/mysql/debian-*.flag est présent sur ce système."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Cela indique qu'une version plus récente du paquet mysql-server a été "
+"précédemment installée."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr "Il n'est pas garanti que cette version puisse en utiliser les données."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Note importante pour les utilisateurs NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Pour pouvoir utiliser MySQL, les utilisateurs et les groupes suivants "
+"doivent être ajoutés au système :"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Vous devez également vérifier le propriétaire et les permissions du "
+"répertoire /var/lib/mysql :"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Faut-il supprimer toutes les bases de données MySQL ?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Le répertoire /var/lib/mysql qui contient les bases de données de MySQL va "
+"être supprimé."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Si vous prévoyez d'installer une version plus récente de MySQL ou si un "
+"autre paquet mysql-server les utilise déjà, vous devriez les conserver."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Faut-il lancer MySQL au démarrage ?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL peut être lancé soit au démarrage, soit en entrant la commande « /etc/"
+"init.d/mysql start »."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nouveau mot de passe du superutilisateur de MySQL :"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Il est très fortement recommandé d'établir un mot de passe pour le compte "
+"d'administration de MySQL (« root »)."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Si ce champ est laissé vide, le mot de passe ne sera pas changé."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Confirmation du mot de passe du superutilisateur de MySQL :"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Impossible de changer le mot de passe de l'utilisateur « root » de MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Une erreur s'est produite lors du changement de mot de passe du compte "
+"d'administration. Un mot de passe existait peut-être déjà ou il n'a pas été "
+"possible de communiquer avec le serveur MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Vous devriez vérifier le mot de passe de ce compte après l'installation du "
+"paquet."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Veuillez consulter le fichier /usr/share/doc/mysql-server-5.0/README.Debian "
+"pour plus d'informations."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Erreur de saisie du mot de passe"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Le mot de passe et sa confirmation ne sont pas identiques. Veuillez recommencer."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Gérer les connexions d'hôtes qui utilisent les versions Debian « sarge » ou "
+"antérieures  ?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"La méthode de stockage des mots de passe n'était pas très sûre dans les "
+"version précédentes de ce paquet. Cette méthode a été améliorée mais les "
+"modifications empêchent la connexion avec de nouveaux comptes ou des comptes "
+"dont le mot de passe a été modifié, pour les clients (p. ex. PHP) depuis des "
+"hôtes qui utilisent Debian 3.1 « sarge »."
+

Added: mysql-dfsg-5.0/branches/unstable/debian/po/gl.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/gl.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/gl.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,216 @@
+# Galician translation of mysql-dfsg-5.0's debconf templates
+# This file is distributed under the same license as the mysql-dfsg-5.0 package.
+# Jacobo Tarrio <jtarrio at debian.org>, 2007, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-05-08 20:05+0200\n"
+"PO-Revision-Date: 2008-05-13 00:04+0100\n"
+"Last-Translator: Jacobo Tarrio <jtarrio at debian.org>\n"
+"Language-Team: Galician <proxecto at trasno.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "¿Quere pasar a unha versión anterior?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Neste sistema hai un ficheiro chamado /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Este ficheiro indica que antes se instalou un paquete mysql-server cunha "
+"versión superior."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Non se pode garantir que a versión que está a instalar poida empregar as "
+"bases de datos actuais."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Nota importante para os usuarios de NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Para empregar MySQL deberían engadirse ao sistema as seguintes entradas de "
+"usuarios e grupos:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Tamén debería comprobar os permisos e o propietario do directorio /var/lib/"
+"mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "¿Eliminar tódalas bases de datos de MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Hase eliminar o directorio /var/lib/mysql, que contén as bases de datos de "
+"MySQL."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Se está a eliminar o paquete MySQL para instalar despois unha versión máis "
+"recente ou se xa hai un paquete mysql-server diferente a empregalo, debería "
+"conservar os datos."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "¿Iniciar o servidor MySQL co ordenador?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"Pódese iniciar automaticamente o servidor MySQL ao iniciar o ordenador, ou "
+"manualmente coa orde \"/etc/init.d/mysql start\"."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Novo contrasinal para o usuario \"root\" de MySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Aínda que non é obrigatorio, recoméndase encarecidamente que estableza un "
+"contrasinal para o usuario administrativo \"root\" de MySQL."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Se deixa o campo en branco, non se ha cambiar o contrasinal."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Repita o contrasinal para o usuario \"root\" de MySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Non se puido establecer o contrasinal do usuario \"root\" de MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Houbo un erro ao establecer o contrasinal do usuario administrativo de "
+"MySQL. Puido ocorrer porque o usuario xa teña un contrasinal ou debido a un "
+"problema de comunicacións co servidor MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Debería comprobar o contrasinal da conta trala instalación do paquete."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Consulte o ficheiro /usr/share/doc/mysql-server-5.0/README.Debian para máis "
+"información."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Erro na introdución do contrasinal"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Os dous contrasinais que introduciu non son iguais. Volva tentalo."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"¿Soportar as conexións a MySQL de máquinas que empreguen Debian \"sarge\" ou "
+"anterior?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Nas versións antigas dos clientes MySQL de Debian, os contrasinais non se "
+"armacenaban de xeito seguro. Isto mellorouse desde aquela; nembargantes, os "
+"clientes (tales coma PHP) das máquinas que executen Debian 3.1 Sarge non se "
+"han poder conectar a contas recentes ou a contas nas que se cambiara o "
+"contrasinal."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/it.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/it.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/it.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,219 @@
+# Italian (it) translation of debconf templates for mysql-dfsg-5.0
+# Copyright (C) 2006 Software in the Public Interest
+# This file is distributed under the same license as the mysql-dfsg-5.0 package.
+# Luca Monducci <luca.mo at tiscali.it>, 2006 - 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0 5.0.51a italian debconf templates\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-04-27 13:54+0200\n"
+"PO-Revision-Date: 2008-05-02 15:43+0200\n"
+"Last-Translator: Luca Monducci <luca.mo at tiscali.it>\n"
+"Language-Team: Italian <debian-l10n-italian at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Procedere realmente con l'abbassamento di versione?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"Su questo sistema esiste un file con nome /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Quel file indica che in precedenza è stata installata una versione superiore "
+"del pacchetto mysql-server."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Non è garantito che la versione che si sta installando sia in grado di usare "
+"i database presenti."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Nota importante per gli utenti NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Per usare MySQL i seguenti utenti e gruppi devono essere aggiunti al sistema:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Inoltre si devono verificare i permessi e il proprietario della directory /"
+"var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Eliminare tutti i database MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"La directory /var/lib/mysql contenente i database di MySQL sta per essere "
+"eliminata."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Se si rimuove il pacchetto MySQL per poi installare una versione più recente "
+"oppure se sono già in uso da un altro pacchetto mysql-server, i dati non "
+"devono essere eliminati."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Lanciare il server MySQL all'avvio?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"Il server MySQL può essere lanciato automaticamente all'avvio del sistema "
+"oppure manualmente con il comando «/etc/init.d/mysql start»."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nuova password per l'utente «root» di MySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Sebbene non sia obbligatoria, si raccomanda d'impostare una password per "
+"l'utente d'amministrazione «root» di MySQL."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Se questo campo è lasciato vuoto, la password non viene cambiata."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Ripetere la password per l'utente «root» di MySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Impossibile impostare la password per l'utente «root» di MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Si è verificato un errore durante l'impostazione della password per l'utente "
+"d'amministrazione di MySQL. Questo può essere accaduto perché l'utente ha "
+"già una password oppure a causa di un problema di connessione con il server "
+"MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Al termine dell'installazione del pacchetto si deve verificare la password "
+"dell'account."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Per maggiori informazioni si consulti il file /usr/share/doc/mysql-server-"
+"5.0/README.Debian."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Errore nelle password inserite"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Le password inserite sono diverse. Riprovare."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Supporto a connessioni MySQL da macchine con Debian «sarge» o antecedente"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Nelle precedenti versioni dei client MySQL su Debian le password non erano "
+"memorizzate in modo sicuro. Questo è stato migliorato ma i client (per "
+"esempio PHP) presenti su una macchina con Debian 3.1 Sarge non sono più in "
+"grado di connettersi a un nuovo account né ad account le cui password siano "
+"state cambiate."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/ja.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/ja.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/ja.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,225 @@
+# 
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+# 
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# 
+#    Developers do not need to manually edit POT or PO files.
+# 
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0 5.0.51a-7.1\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2008-06-21 07:25+0900\n"
+"Last-Translator: Hideki Yamane (Debian-JP) <henrich at debian.or.jp>\n"
+"Language-Team: Japanese <debian-japanese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "本当にダウングレードを実施しますか?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"/var/lib/mysql/debian-*.flag ファイルがこのシステム上に存在しています。"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"このファイルは、より新しいバージョンの mysql-server パッケージが以前にインス"
+"トールされていたことを示しています。"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"現在のデータベースを今インストールしようとしているバージョンで使える保証はあ"
+"りません。"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "NIS/YP ユーザへの重要な注意"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"MySQL を使うには、システムに以下のユーザ/グループのエントリを追加する必要が"
+"あります:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr "/var/lib/mysql ディレクトリの権限と所有者も確認してください:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "MySQL データベースをすべて削除しますか?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"MySQL データベースが格納されている /var/lib/mysql ディレクトリが削除されま"
+"す。"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"より新しいバージョンの MySQL をインストールするために MySQL パッケージを削除"
+"する場合、あるいは別の mysql-server パッケージを既に使っている場合は、データ"
+"を保持する必要があります。"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "MySQL サーバをシステム起動時に開始しますか?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL サーバをシステム起動時に自動的に開始するようにするか、あるいは '/etc/"
+"init.d/mysql start' と手動で起動するようにするかできます。"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "MySQL の \"root\" ユーザに対する新しいパスワード:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"強制ではないですが、MySQL を管理する \"root\" ユーザのパスワードを設定するこ"
+"とを強くお勧めします。"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "入力が空の場合はパスワードは変更されません。"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "MySQL の \"root\" ユーザパスワードの再入力:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "MySQL の \"root\" ユーザのパスワードを設定できません"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"MySQL の管理者ユーザに対してパスワードを設定しようとした際、エラーが発生した"
+"ようです。これは既に管理者ユーザにパスワードが設定されていたか、MySQL サーバ"
+"との接続に問題があったためだと思われます。"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"パッケージのインストール後、アカウントのパスワードをチェックしてください。"
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"詳細は /usr/share/doc/mysql-server-5.0/README.Debian ファイルを参照してくださ"
+"い。"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "パスワード入力エラー"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "入力した 2 つのパスワードが一致しません。再入力してください。"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Debian \"Sarge\" あるいはそれよりも古いバージョンが稼働しているホストからの "
+"MySQL 接続をサポートしますか?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"以前の Debian の MySQL クライアントでは、パスワードは、あまり安全な方法で保存"
+"されてませんでした。これは改善されましたが、Debian 3.1 Sarge が稼働しているホ"
+"ストからクライアント (PHP など) が新しいアカウントやパスワードが変更されたア"
+"カウントには接続できなくなります。"

Added: mysql-dfsg-5.0/branches/unstable/debian/po/nb.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/nb.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/nb.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,288 @@
+# translation of mysql_nb.po to Norwegian Bokmål
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Bjørn Steensrud <bjornst at powertech.no>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql_nb\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2007-02-18 12:13+0100\n"
+"Last-Translator: Bjørn Steensrud <bjornst at powertech.no>\n"
+"Language-Team: Norwegian Bokmål <i18n-nb at lister.ping.uio.no>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.2\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+#, fuzzy
+#| msgid "Do you really want to downgrade?"
+msgid "Really proceed with downgrade?"
+msgstr "Er du sikker på at du vil nedgradere?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+#, fuzzy
+#| msgid ""
+#| "WARNING: The file /var/lib/mysql/debian-*.flag exists. This indicates "
+#| "that a mysql-server package with a higher version has been installed "
+#| "before. It can not be guaranteed that this version can use its data."
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"ADVARSEL: Fila /var/lib/mysql/debian-*.flag finnes. Dette viser at en mysql-"
+"server-pakke med et høyere versjonsnummer har vært installert før. Det kan "
+"ikke garanteres at denne versjonen kan bruke data fra den høyere versjonen."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+#, fuzzy
+#| msgid "Important note for NIS/YP users!"
+msgid "Important note for NIS/YP users"
+msgstr "Viktig merknad for NIS/YP-brukere!"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+#, fuzzy
+#| msgid ""
+#| "The script is about to remove the data directory /var/lib/mysql. If it is "
+#| "planned to just install a higher MySQL version or if a different mysql-"
+#| "server package is already using it, the data should be kept."
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Dette skriptet skal til å fjerne data-mappa /var/lib/mysql. Denne mappa bør "
+"beholdes hvis det bare skal installeres en høyere MySQL-versjon, eller hvis "
+"en annen mysql-server-pakke allerede bruker den."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+#, fuzzy
+#| msgid "Should MySQL start on boot?"
+msgid "Start the MySQL server on boot?"
+msgstr "Skal MySQL startes ved maskinoppstart?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+#, fuzzy
+#| msgid ""
+#| "The MySQL can start automatically on boot time or only if you manually "
+#| "type '/etc/init.d/mysql start'."
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL kan startes automatisk når maskinen starter, eller bare hvis du "
+"skriver «/etc/init.d/mysql start»."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+#, fuzzy
+#| msgid "New password for MySQL \"root\" user:"
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nytt passord for MySQLs «root»-bruker:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+#, fuzzy
+#| msgid ""
+#| "It is highly recommended that you set a password for the MySQL "
+#| "administrative \"root\" user."
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Det anbefales sterkt at du oppgir et passord for den administrative «root»-"
+"brukeren i MySQl."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+#, fuzzy
+#| msgid "New password for MySQL \"root\" user:"
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Nytt passord for MySQLs «root»-bruker:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+#, fuzzy
+#| msgid "Unable to set password for MySQL \"root\" user"
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Klarer ikke angi passord for MySQLs «root»-bruker"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+#, fuzzy
+#| msgid ""
+#| "It seems an error occurred while setting the password for the MySQL "
+#| "administrative user.  This may have happened because the user already has "
+#| "a password, or because there was a problem communicating with the MySQL "
+#| "server."
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Det ser ut til at det oppsto en feil mens det ble satt et passord for MySQLs "
+"administrative bruker. Dette kan være fordi brukeren allerede har et "
+"passord, eller fordi det var et kommunikasjonsproblem med MySQL-tjeneren."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Skal MySQL-tilkoblinger støttes fra vertsmaskiner som kjører Debian «sarge» "
+"eller eldre?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+#, fuzzy
+#| msgid ""
+#| "The way passwords were stored was not very secure. This has been improved "
+#| "with the drawback that clients (e.g. PHP) from hosts running Debian 3.1 "
+#| "Sarge will not be able to connect to account which are new or whose "
+#| "password have been changed. See /usr/share/doc/mysql-server-5.0/README."
+#| "Debian."
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Passord ble tidligere lagret på en lite sikker måte. Dette er nå forbedret, "
+"med den ulempen at klienter (f.eks. PHP) fra verter som kjører Debian 3.1 "
+"Sarge ikke vil kunne koble til en konto som er ny eller har fått endret "
+"passordet. Se /usr/share/doc/mysql-server-5.0/README.Debian."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "For å bruke MySQL må du installere en bruker og gruppe tilsvarende den "
+#~ "nedenfor og se til at /var/lib/mysql har riktige rettigheter (uid/gid kan "
+#~ "være forskjellig)."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr "Skal databasene brukt av alle MySQL-versjoner fjernes?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr ""
+#~ "Hvis du ikke oppgir et passord blir det ikke gjort noen endringer med "
+#~ "kontoen."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "Når installasjonen er ferdig bør det sjekkes at kontoen er ordentlig "
+#~ "beskyttet med et passord (mer informasjon finnes i README.Debian)."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/nl.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/nl.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/nl.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,220 @@
+# Dutch mysql-dfsg-5.0 po-debconf translation,
+# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the mysql-dfsg-5.0 package.
+# Vincent Zweije <zweije at xs4all.nl>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0 5.0.30-1\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-06-25 15:53+0200\n"
+"PO-Revision-Date: 2008-07-23 18:30+0200\n"
+"Last-Translator: Thijs Kinkhorst <thijs at debian.org>\n"
+"Language-Team: Debian-Dutch <debian-l10n-dutch at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Wilt u echt een oude versie herstellen?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Op uw systeem is een bestand genaamd /var/lib/mysql/debian-*.flag "
+"aangetroffen."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Een dergelijk bestand is een indicatie dat een hogere versie van het pakket "
+"mysql-server geïnstalleerd is geweest."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Er is geen garantie dat de versie die u nu installeert de bestaande "
+"databases kan gebruiken."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Belangrijke opmerking voor gebruikers van NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Om MySQL te kunnen gebruiken, moeten de volgende gebruikers en groepen "
+"aan het systeem toegevoegd worden:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Controleert u ook de toegangsrechten en eigenaar van de map /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Alle MySQL-databases verwijderen?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"De map /var/lib/mysql, die alle MySQL databases bevat, staat op het punt "
+"verwijderd te worden."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Als "
+"het plan alleen maar is om een hogere MySQL versie te installeren, of als "
+"een ander mysql-serverpakket deze al gebruikt, dan zou de data moeten "
+"worden behouden."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "MySQL starten als de computer start?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL kan automatisch starten bij het starten van de computer, of handmatig "
+"door '/etc/init.d/mysql start' uit te voeren."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nieuw wachtwoord voor de MySQL \"root\"-gebruiker:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Het wordt sterk aangeraden een wachtwoord in te stellen voor de "
+"administratieve MySQL \"root\"-gebruiker."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Als dit wordt leeggelaten, zal het wachtwoord niet gewijzigd worden."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Hehaal wachtwoord voor de MySQL \"root\"-gebruiker:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Kan het wachtwoord voor de MySQL \"root\"-gebruiker niet instellen"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Er is een fout opgetreden bij het instellen van het wachtwoord "
+"van de MySQL administratieve gebruiker. Dat kan komen doordat de gebruiker "
+"al een wachtwoord heeft, of omdat er een probleem was bij het communiceren "
+"met de MySQL server."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Controleert u het wachtwoord van deze gebruiker nadat het pakket "
+"geïnstalleerd is."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Zie /usr/share/doc/mysql-server-5.0/README.Debian voor aanvullende informatie."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Invoerfout wachtwoord"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "De twee wachtwoorden die u opgaf waren verschillend. Probeert u het opnieuw."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Moet u MySQL-verbindingen accepteren van computers die Debian \"sarge\" of "
+"ouder draaien?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"De wijze waarop wachtwoorden werden bewaard was niet erg veilig. Dit is "
+"verbeterd, maar helaas zullen programma's (zoals PHP) van computers die Debian 3.1 Sarge "
+"draaien, geen verbinding meer kunnen maken met accounts die nieuw zijn, of "
+"waarvan het wachtwoord is gewijzigd."
+

Added: mysql-dfsg-5.0/branches/unstable/debian/po/pt.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/pt.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/pt.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,276 @@
+# Portuguese translation for mysql-dfsg-5.0's debconf messages
+# Copyright (C) 2006 Miguel Figueiredo <elmig at debianpt.org>
+# This file is distributed under the same license as the mysql-dfsg-5.0 package.
+# Miguel Figueiredo <elmig at debianpt.org>, 2006-2008
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2008-06-16 18:58+0100\n"
+"Last-Translator: Miguel Figueiredo <elmig at debianpt.org>\n"
+"Language-Team: Portuguese <traduz at debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Deseja mesmo fazer downgrade?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Existe um ficheiro chamado /var/lib/mysql/debian-*.flag neste sistema."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Tal ficheiro significa que anteriormente foi instalado um pacote mysql-"
+"server com um número de versão superior."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Não existe nenhuma garantia que a versão que está actualmente a instalar "
+"seja capaz de utilizar as bases de dados actuais."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Nota importante para utilizadores de NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Para utilizar o MySQL, têm de ser acrescentadas as seguintes entradas para "
+"os utilizadores e grupos:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Deve também verificar as permissões e o dono do directório /var/lib/mysql :"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Remover todas as bases de dados MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"O directório /var/lib/mysql que contém as bases de dados MySQL está prestes "
+"a ser removido."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Se está a remover o pacote MySQL de modo a posteriormente instalar uma "
+"versão mais recente ou se um pacote mysq-server já os está a utilizar, os "
+"dados devem ser mantidos."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Iniciar o servidor MySQL no arranque?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"O MySQL pode ser automaticamente lançado no arranque ou manualmente através "
+"do comando '/etc/init.d/mysql start'."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nova palavra-passe para o utilizador \"root\" do MySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Embora não seja obrigatório, é fortemente recomendado que defina uma palavra-"
+"passe para o utilizador administrativo \"root\" do MySQL."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr ""
+"Se esse campo for deixado em branco, a palavra-passe não irá ser alterada."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Repita a palavra-passe para o utilizador \"root\" do MySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr ""
+"Não foi possível definir a palavra-passe para o utilizador \"root\" do MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Ocorreu um erro enquanto era definida a palavra-passe para o utilizador "
+"administrativo do MySQL. Isto pode ter acontecido porque a conta já tem uma "
+"palavra-passe, ou porque ocorreu um problema ao comunicação com o servidor "
+"MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Você deve verificar a palavra-passe da conta após a instalação do pacote."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Para mais informação por favor leia o ficheiro /usr/share/doc/mysql-server-"
+"5.0/README.Debian."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Erro de entrada da palavra-passe"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+"As duas palavras-passe que introduziu não são iguais. Por favor tente "
+"novamente."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Suportar ligações MySQL de máquinas que corram Debian \"sarge\" ou mais "
+"antigos?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Nas versões antigas de clientes de MySQL em Debian, as palavras-passe não "
+"eram guardadas de forma segura. Isto foi melhorado desde aí, no entanto os "
+"clientes (como o PHP) de máquinas que corram Debian 3.1 Sarge não irão "
+"conseguir ligar-se a contas novas ou cuja palavra-passe foi alterada."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Para utilizar mysql e instalar um utilizador e grupo equivalentes para o "
+#~ "seguinte e assegurar-se que /var/lib/mysql têm as permissões correctas (o "
+#~ "uid/gid podem ser diferentes)."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr "Remover as bases de dados utilizadas por todas as versões de MySQL?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr ""
+#~ "Se não disponibilizar uma password não serão feitas alterações nesta "
+#~ "conta."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "Quando terminar a instalação, deve verificar se a conta está devidamente "
+#~ "protegida com uma password (para mais informações veja README.Debian)."
+
+#~ msgid "Cannot upgrade if ISAM tables are present!"
+#~ msgstr "Não é possível actualizar se estiverem presentes tabelas ISAM!"
+
+#~ msgid ""
+#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
+#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
+#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
+#~ "The installation of mysql-server-5.0 will now abort. In case your old "
+#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
+#~ "those tables."
+#~ msgstr ""
+#~ "As versões recentes de MySQL já não podem utilizar o antigo formato de "
+#~ "tabelas ISAM e é por isso necessário converter as suas tabelas pra e.g. "
+#~ "MyISAM antes da actualização, utilizando \"mysql_convert_table_format\" "
+#~ "ou \"ALTER TABLE x ENGINE=MyISAM\". A instalação de mysql-server-5.0 irá "
+#~ "agora ser cancelada. Se o seu antigo mysql-server-4.1 for removido apenas "
+#~ "reinstale para converter essas tabelas."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/pt_BR.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/pt_BR.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/pt_BR.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,415 @@
+# Brazilian Portuguese (pt_BR) debconf template translation for
+# Debian's mysql-dfsg source package.
+# Debian-BR Project <debian-l10n-portuguese at lists.debian.org>
+# André Luís Lopes, <andrelop at debian.org> , 2004
+# André Luís Lopes, <andrelop at debian.org> , 2006
+# André Luís Lopes, <andrelop at debian.org> , 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2007-04-21 15:59-0300\n"
+"Last-Translator: André Luís Lopes <andrelop at debian.org>\n"
+"Language-Team: Debian-BR Project <debian-l10n-portuguese at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"pt_BR utf-8\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Realmente proceder com o rebaixamento de versão?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Um arquivo de nome /var/lib/mysql/debian-*.flag existe no sistema."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"A presença de um arquivo como este é uma indicação de que um pacote mysql-"
+"server com um número de versão mais alto já foi instalado anteriormente."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Não há garantias de que a versão que você está instalando no momento "
+"conseguirá utilizar as bases de dados existentes."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Aviso importante para usuários NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Para utilizar o MySQL, as seguintes entradas para usuários e grupos devem "
+"ser adicionadas ao sistema:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Você deverá também checar as permissões e o dono do diretório /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Remover todas as bases de dados do MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"O diretório /var/lib/mysql, o qual contém as bases de dados do MySQL, está "
+"prestes a ser removido."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Caso você esteja removendo o pacote MySQL para posteriormente instalar uma "
+"versão mais recente ou, caso uma versão diferente do pacote mysql-server "
+"esteja sendo utilizada, os dados deverão ser mantidos."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Iniciar o servidor MySQL junto a inicialização da máquina?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"O servidor MySQL pode ser iniciado automaticamente junto a inicialização da "
+"máquina ou manualmente com o comando '/etc/init.d/mysql start'."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nova senha para o usuário \"root\" do MySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Apesar de não ser mandatório, é altamente recomendado que você defina uma "
+"senha para o usuário administrativo \"root\" do MySQL."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Caso este campo seja deixado em branco, a senha não sera mudada."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+#, fuzzy
+#| msgid "New password for the MySQL \"root\" user:"
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Nova senha para o usuário \"root\" do MySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Impossível definir senha para o usuário \"root\" do MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Um erro ocorreu durante a definição da senha para o usuário administrativo "
+"do MySQL. Isso pode ter acontecido devido a esse usuário já possuir uma "
+"senha definida ou devido a ocorrência de um problema de comunicação com o "
+"servidor MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+#, fuzzy
+#| msgid ""
+#| "You should check the account's password after tha package installation."
+msgid "You should check the account's password after the package installation."
+msgstr "Você deverá checar a senha dessa conta após a instalação deste pacote."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Por favor, leia o arquivo /usr/share/doc/mysql-server-5.0/README.Debian para "
+"maiores informações."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Suportar conexões MySQL originadas de hosts executando o Debian \"sarge\" ou "
+"mais antigos ?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Em versões antigas dos clientes MySQL no Debian, as senhas não eram "
+"armazenadas de forma segura. Isto foi corrigido desde então, porém, clientes "
+"(como o PHP) em hosts executando o Debian 3.1 Sarge não serão capazes de "
+"conectar em contas recentes ou contas as quais as senhas tenham sido "
+"modificadas."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Para utilizar o MySQL, você deve instalar um usuário e um grupo "
+#~ "equivalentes ao usuário e grupo a seguir para se certificar de que o "
+#~ "diretório /var/lib/mysql possua as permissões correctas (o uid/gid podem "
+#~ "ser diferentes)."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr "Remover as bases de dados utilizadas por todas as versões do MySQL?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr ""
+#~ "Caso você não forneça uma senha, nenhuma mudança será feita na conta."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "Quando a instalação finalizar, você deverá verificar se a conta está "
+#~ "apropriadamente protegida com uma senha (consulte o arquivo README.Debian "
+#~ "para maiores informações)."
+
+#~ msgid "internal"
+#~ msgstr "interno"
+
+#~ msgid "Only internally used."
+#~ msgstr "Somente utilizado internamente."
+
+#, fuzzy
+#~ msgid "Update Hints"
+#~ msgstr "Dicas de atualização"
+
+#, fuzzy
+#~ msgid ""
+#~ "Rarely, e.g. on new major versions, the privilege system is improved. To "
+#~ "make use of it mysql_fix_privilege_tables must be executed manually. The "
+#~ "script is not supposed to give any user more rights that he had before,"
+#~ msgstr ""
+#~ "Raramente, por exemplo, em novas versões maiores, o sistema de "
+#~ "privilégios é melhorado. Para fazer uso disso, o script "
+#~ "mysql_fix_privilege_tables deve ser executado manualmente. O script não "
+#~ "atribuirá a nenhum usuário mais direitos do que os mesmos já possuíam "
+#~ "anteriormente."
+
+#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
+#~ msgstr "Por favor, leia http://www.mysql.com/doc/en/Upgrade.html"
+
+#, fuzzy
+#~ msgid "Install Hints"
+#~ msgstr "Dicas de instalação"
+
+#, fuzzy
+#~ msgid ""
+#~ "MySQL will only install if you have a non-numeric hostname that is "
+#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
+#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
+#~ "myhostname\"."
+#~ msgstr ""
+#~ "O MySQL será instalado somente caso você possua um nome de host NÃO "
+#~ "NUMÉRICO que possa ser resolvido através do arquivo /etc/hosts, ou seja, "
+#~ "caso o comando \"hostname\" retorne \"myhostname\", uma linha como "
+#~ "\"10.0.0.1 myhostname\" deverá existir no arquivo /etc/hosts."
+
+#~ msgid ""
+#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
+#~ "is used in the start/stop and cron scripts. Don't delete."
+#~ msgstr ""
+#~ "Um novo usuário MySQL de nome \"debian-sys-maint\" será criado. Essa "
+#~ "conta MySQL é utilizada pelos scripts de inicialização/parada e pelos "
+#~ "scripts cron. Não remova esse usuário."
+
+#, fuzzy
+#~ msgid ""
+#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
+#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
+#~ "there, never only the password!"
+#~ msgstr ""
+#~ "Por favor, lembre-se de definir uma SENHA para o usuário root do MySQL ! "
+#~ "Caso você utilize um arquivo /root/.my.cnf, sempre inclua as linhas \"user"
+#~ "\" e \"password\" nesse arquivo, nunca somente a senha ! Consulte o "
+#~ "arquivo /usr/share/doc/mysql-server/README.Debian para mais informações."
+
+#~ msgid ""
+#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
+#~ "mysql-server package?"
+#~ msgstr ""
+#~ "Todas as base de dados sob o diretório /var/lib/mysql devem ser removidas "
+#~ "quando você remover o pacote pacote mysql-server ?"
+
+#~ msgid ""
+#~ "Networking is disabled by default for security reasons. You can enable it "
+#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
+#~ msgstr ""
+#~ "O suporte ao funcionamento em rede está desativado por padrão por "
+#~ "questões de segurança. Você poderá ativá-lo comentando a opção 'skip-"
+#~ "networking' no arquivo /etc/mysql/my.cnf."
+
+#~ msgid "security and update notice"
+#~ msgstr "aviso de segurança e actualização"
+
+#~ msgid ""
+#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
+#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
+#~ "remove everything including the configuration) somewhen? (default is not)"
+#~ msgstr ""
+#~ "Devo remover tudo abaixo de /var/lib/mysql quando fizer o purge do pacote "
+#~ "mysql-server com o comando \"dpkg --purge mysql-server\" (ou seja, "
+#~ "remover tudo incluíndo a configuração)? (o padrão é não remover)"
+
+#~ msgid "Make MySQL reachable via network?"
+#~ msgstr "Fazer com que o MySQL seja acessível via rede?"
+
+#~ msgid ""
+#~ "Should MySQL listen on a network reachable TCP port? This is not "
+#~ "necessary for use on a single computer and could be a security problem."
+#~ msgstr ""
+#~ "O MySQL deve aguardar ligações numa porta TCP acessível via rede? Isto "
+#~ "não é necessário para uso num único computador e pode ser um problema de "
+#~ "segurança."
+
+#~ msgid "Enable chroot mode?"
+#~ msgstr "Activar o modo chroot?"
+
+#~ msgid ""
+#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
+#~ "that users cannot modify any files outside this directory. This improves "
+#~ "resistence against crackers, too, as they are not able to modify system "
+#~ "files."
+#~ msgstr ""
+#~ "O MySQL é capaz de se prender no diretório /var/lib/mysql_jail, assim os "
+#~ "utilizadores não poderão modificar ficheiros fora deste directório. Isto "
+#~ "aumenta também a resistência contra crackers, pois eles não poderão "
+#~ "modificar arquivos de sistema."
+
+#~ msgid "Please run mysql_fix_privilege_tables !"
+#~ msgstr "Por favor execute mysql_fix_privilege_tables !"
+
+#~ msgid ""
+#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
+#~ "other than root and mysql with mysql."
+#~ msgstr ""
+#~ "Permissões seguras para o diretório /var/lib/mysql serão asseguradas "
+#~ "substituíndo GIDs diferentes de root e mysql por mysql."
+
+#~ msgid ""
+#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
+#~ msgstr ""
+#~ "Instruções sobre como activar o suporte de SSL estão disponíveis no "
+#~ "directório /usr/share/doc/mysql-server/."
+
+#, fuzzy
+#~ msgid "mysql_fix_privileges_tables should be executed"
+#~ msgstr "mysql_fix_privileges_tables será executado"
+
+#, fuzzy
+#~ msgid ""
+#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
+#~ "system. To make use of it, some new fields must be added to the tables "
+#~ "in  the \"mysql\" database. This will not happen automatically."
+#~ msgstr ""
+#~ "As últimas versões do MySQL possuem um sistema de privilégios melhorado e "
+#~ "mais refinado. Para utilizá-lo, alguns novos campos devem ser adicionados "
+#~ "as tabelas na base de dados \"mysql\". Isto é feito pelo script "
+#~ "mysql_fix_privileges_tables durante esta actualização independente do "
+#~ "servidor estar a correr ou não !"
+
+#~ msgid ""
+#~ "This script is not supposed to give any user more rights that he had "
+#~ "before, if you encounter such a case, please contact me."
+#~ msgstr ""
+#~ "Este script não deverá fornecer mais direitos a um utilizador além dos "
+#~ "quais ele já possua anteriormente. SE encontrar um caso desses, por favor "
+#~ "entre em contacto com o mantainer deste pacote Debian."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/ro.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/ro.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/ro.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,281 @@
+# translation of ro_new.po to Română
+# Romanian translation of mysql-dfsg.
+# Copyright (C) 2006 THE mysql-dfsg'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the mysql-dfsg package.
+#
+# Stan Ioan-Eugen <stan.ieugen at gmail.com>, 2006.
+# Eddy Petrișor <eddy.petrisor at gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ro_new\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2008-06-18 15:24+0300\n"
+"Last-Translator: Eddy Petrișor <eddy.petrisor at gmail.com>\n"
+"Language-Team: Română <debian-l10n-romanian at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3;plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?"
+"2:1))\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Sigur doriți să instalați o versiune mai veche?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+"Pe acest sistem există deja un fișier numit /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Acest fișier indică faptul că în trecut a fost instalată o versiune mai nouă "
+"a pachetului mysql-server."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Nu se poate garanta că versiunea instalată acum va putea folosi bazele de "
+"date actuale."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Notă importantă pentru utilizatorii de NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Pentru a folosi MySQL, următoarele intrări pentru utilizatori și grupuri ar "
+"trebui adăugate sistemului:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Ar trebui să verificați, de asemenea, permisiunile și proprietarul "
+"directorului /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Se șterg toate bazele de date MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Directorul /var/lib/mysql care conține bazele de date MySQL e pe cale a fi "
+"șters."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Dacă ștergeți pachetul MySQL pentru a instala o versiune mai nouă de MySQL "
+"sau dacă datele sunt folosite de către un alt pachet mysql-server, atunci "
+"datele ar trebui păstrate."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Doriți ca MySQL să pornească la inițializarea sistemului?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"Serverul MySQL poate fi pornit automat la inițializarea sistemului sau "
+"manual cu comanda „/etc/init.d/mysql start”."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Noua parolă pentru utilizatorul „root” al MySQL:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Deși nu este obligatoriu, este recomandat să stabiliți o parolă pentru "
+"utilizatorul administrativ „root” al MySQL."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Dacă acel câmp e lăsat gol, parola nu va fi schimbată."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Repetați parola pentru utilizatorul „root” al MySQL:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Nu s-a putut stabili parola pentru utilizatorul „root” al MySQL"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"A intervenit o eroare în stabilirea parolei pentru utilizatorul "
+"administrativ al MySQL. Acest lucru se poate întâmpla dacă acel cont are "
+"deja o parolă, sau dacă a existat o problemă în comunicarea cu serverul "
+"MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+"Ar trebui să verificați parola contului după ce se instalează pachetul."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"A se citi fișierul /usr/share/doc/mysql-server-5.0/README.Debian pentru mai "
+"multe informații."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Eroare la introducerea parolei"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Cele două parole introduse nu sunt identice. Încercați din nou."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Suportați conexiuni MySQL de la stații ce rulează sistemul Debian „sarge” "
+"sau mai vechi?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"În versiunile vechi de clienți MySQL pe Debian, parolele nu erau păstrate "
+"securizat. Acest lucru s-a îmbunătățit, însă clienții (de exemplu, PHP) de "
+"pe stații ce rulează Debian 3.1 Sarge nu se vor putea conecta la conturi noi "
+"sau conturi ale căror parole au fost schimbate."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Pentru a folosi mysql trebuie să adăugați un utilizator și grup "
+#~ "echivalent și să vă asigurați că /var/lib/mysql are permisiunile "
+#~ "stabilite corect (uid/gid pot avea valori diferite)."
+
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#~ msgid "Remove the databases used by all MySQL versions?"
+#~ msgstr "Doriți să ștergeți bazele de date folosite de toate versiune MySQL?"
+
+#~ msgid ""
+#~ "If you do not provide a password no changes will be made to the account."
+#~ msgstr ""
+#~ "Dacă nu introduceți nici o parolă, nici o schimbare nu va fi luată în "
+#~ "considerare."
+
+#~ msgid ""
+#~ "When installation finishes, you should verify that the account is "
+#~ "properly protected with a password (see README.Debian for more "
+#~ "information)."
+#~ msgstr ""
+#~ "După finalizarea instalării, ar trebui să verificați dacă contul este "
+#~ "protejat cu o parolă (citiți fișierul README.Debian pentru informații "
+#~ "suplimentare)."
+
+#~ msgid "Cannot upgrade if ISAM tables are present!"
+#~ msgstr "Nu se poate face actualizarea dacă sunt prezente tabele ISAM!"
+
+#~ msgid ""
+#~ "Recent versions of MySQL can no longer use the old ISAM table format and "
+#~ "it is necessary to convert your tables to e.g. MyISAM before upgrading by "
+#~ "using \"mysql_convert_table_format\" or \"ALTER TABLE x ENGINE=MyISAM\". "
+#~ "The installation of mysql-server-5.0 will now abort. In case your old "
+#~ "mysql-server-4.1 gets removed nevertheless just reinstall it to convert "
+#~ "those tables."
+#~ msgstr ""
+#~ "Versiunile recente MySQL nu mai pot folosi vechiul format de tabele ISAM "
+#~ "și este necesar să convertiți tabelele dumneavoastră (de ex. în MyISAM) "
+#~ "înainte de a face actualizarea folosind comanda "
+#~ "„mysql_convert_table_format” sau „ALTER TABLE x ENGINE=MyISAM”. "
+#~ "Instalarea mysql-server-5.0 va fi abandonată. În caz că ștergeți "
+#~ "versiunea anterioară mysql-server-4.1, va trebui reinstalată pentru a "
+#~ "converti tabelele."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/ru.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/ru.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/ru.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,221 @@
+# translation of ru.po to Russian
+# Russian messages:
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Ilgiz Kalmetev <translator at ilgiz.pp.ru>, 2003.
+# Yuriy Talakan' <yt at amur.elektra.ru>, 2005, 2006.
+# Yuriy Talakan' <yt at drsk.ru>, 2007.
+# Yuri Kozlov <kozlov.y at gmail.com>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0 5.0.51a-7\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-06-06 08:49+0200\n"
+"PO-Revision-Date: 2008-06-13 23:46+0400\n"
+"Last-Translator: Yuri Kozlov <kozlov.y at gmail.com>\n"
+"Language-Team: Russian <debian-l10n-russian at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Вы действительно желаете понизить версию?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "В системе существует файл с именем /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr "Это означает, что ранее был установлен пакет mysql-server более новой версии."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr "Невозможно гарантировать, что текущая версия сможет использовать его данные."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Важное замечание для пользователей NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"Чтобы использовать MySQL, в систему нужно добавить следующие записи о "
+"пользователях и группах:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr "Также вы должны проверить права и владельца каталога /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Удалить все базы данных MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr "Планируется удалить каталог /var/lib/mysql с базами данных MySQL."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Если будет установлена новая версия MySQL или есть другие "
+"пакеты mysql-server, использующие этот каталог, то данные надо сохранить."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Запускать MySQL при загрузке системы?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL может запускаться при загрузке системы или вручную по "
+"команде '/etc/init.d/mysql start'."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Новый пароль для MySQL пользователя \"root\":"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Хотя и необязательно, но крайне рекомендуется установить пароль для "
+"административного MySQL пользователя \"root\"."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Если оставить поле пустым, то пароль изменён не будет."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Повторите ввод пароля для MySQL пользователя \"root\":"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Невозможно задать пароль MySQL пользователю \"root\""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"В процессе задания пароля административного MySQL пользователя произошла "
+"ошибка. Это могло произойти, если у пользователя уже был задан пароль, или "
+"из-за проблем соединения с сервером MySQL."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Вам нужно проверить пароль к учётной записи после установки пакета."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+"Прочтите дополнительную информацию из файла "
+"/usr/share/doc/mysql-server-5.0/README.Debian."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Ошибка при вводе пароля"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Были введены не одинаковые пароли. Попробуйте ещё раз."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Нужна поддержка подключений к MySQL с машин, работающих под Debian \"sarge\" "
+"или старше?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"В старых версиях клиентов MySQL в Debian метод хранения пароля был не очень "
+"безопасен. Это было исправлено, однако клиенты (например, PHP) с машин, "
+"работающих под Debian 3.1 Sarge не смогут подключиться новой учётной "
+"записью, или учётными записями, у которых был изменён пароль."
+

Added: mysql-dfsg-5.0/branches/unstable/debian/po/sk.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/sk.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/sk.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,164 @@
+# Slovak translation of mysql-dfsg-5.0.
+# Copyright (C) 2005 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the mysql-dfsg-5.0 package.
+# Ivan Masár <helix84 at centrum.sk>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-06-25 15:53+0200\n"
+"PO-Revision-Date: 2008-07-04 17:19+0100\n"
+"Last-Translator: Ivan Masár <helix84 at centrum.sk>\n"
+"Language-Team: Slovak <sk-i18n at lists.linux.sk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Naozaj pokračovať v downgrade?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Na tomto systéme sa nachhádza súbor s názvom /var/lib/mysql/debian-*.flag."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Such file is an indication that a mysql-server package with a higher version has been installed earlier."
+msgstr "Prítomnosť tohto súboru znamená, že v minulosti bol nainštalovaný balík mysql-server s vyššou verziou."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "There is no guarantee that the version you're currently installing will be able to use the current databases."
+msgstr "Neexistuje záruka, že verzia, ktorú práve inštalujete, bude schopná pracovať s vašimi databázami v súčasnom formáte."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Dôležitá poznámka pre používateľov  NIS/YP"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "To use MySQL, the following entries for users and groups should be added to the system:"
+msgstr "Aby ste mohli používať MySQL, do systému by ste mali pridať nasledovných používateľov a skupiny:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "You should also check the permissions and the owner of the /var/lib/mysql directory:"
+msgstr "Tiež by ste mali skontrolovať oprávnenia a vlastníka adresára /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Odstrániť všetky databázy MySQL?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "The /var/lib/mysql directory which contains the MySQL databases is about to be removed."
+msgstr "Adresár /var/lib/mysql, ktorý obsahuje databázy MySQL bude odstránený."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "If you're removing the MySQL package in order to later install a more recent version or if a different mysql-server package is already using it, the data should be kept."
+msgstr "Ak odstraňujete balík MySQL aby ste mohli neskôr nainštalovať novšiu verziu alebo ak ich využíva iný balík mysql-server, údaje by ste mali ponechať."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Spustiť MySQL server pri štarte systému?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "The MySQL server can be launched automatically at boot time or manually with the '/etc/init.d/mysql start' command."
+msgstr "MySQL server je možné automaticky spustiť pri štarte systému alebo ručne príkazom „/etc/init.d/mysql start”."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nové heslo MySQL používateľa „root”:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "While not mandatory, it is highly recommended that you set a password for the MySQL administrative \"root\" user."
+msgstr "Hoci to nie je nevyhnutné, silne sa odporúča, aby ste nastavili heslo používateľa „root”:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Ak toto pole necháte nevyplnené, heslo sa nezmení."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Zopakujte heslo MySQL používateľa „root”:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Nebolo možné nastaviť heslo MySQL používateľa „root”:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server."
+msgstr "Počas nastavovania hesla MySQL používateľa „root” sa vyskytla chyba. Možno sa to stalo preto, že tento účet už má heslo alebo kvôli problému pri komunikácii s MySQL serverom."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Po inštalácii balíka by ste mali skontrolovať heslo účtu."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001
+#: ../mysql-server-5.0.templates:10001
+msgid "Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more information."
+msgstr "Prosím, prečítajte si súbor /usr/share/doc/mysql-server-5.0/README.Debian, kde nájdete podrobnejšie informácie."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Chyba pri zadávaní hesla"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Dve heslá, ktoré ste zadali, sa nezhodujú. Skúste to prosím znova."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr "Podporovať MySQL pripojenia od strojov, na ktorých beží Debian „sarge” alebo starší?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "In old versions of MySQL clients on Debian, passwords were not stored securely. This has been improved since then, however clients (such as PHP) from hosts running Debian 3.1 Sarge will not be able to connect to recent accounts or accounts whose password have been changed."
+msgstr "V starých verziách MySQL na systéme Debian neboli heslá ukladané bezpečne. Odvtedy sa situácia zlepšila, no klienti (ako napr. PHP) zo strojov , na ktorých beží Debian 3.1 Sarge nebudú schopní pripojiť sa k novým účtom ani účtom, ktorých heslo sa zmenilo."
+

Added: mysql-dfsg-5.0/branches/unstable/debian/po/sv.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/sv.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/sv.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,224 @@
+# translation of mysql-dfsg-5.0_5.0.51a-6_sv.po to swedish
+# Translators, if you are not familiar with the PO format, gettext
+# documentation is worth reading, especially sections dedicated to
+# this format, e.g. by running:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Some information specific to po-debconf are available at
+# /usr/share/doc/po-debconf/README-trans
+# or http://www.debian.org/intl/l10n/po-debconf/README-trans
+# Developers do not need to manually edit POT or PO files.
+# 
+# Martin Bagge <martin.bagge at bthstudent.se>, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0_5.0.51a-6_sv\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: 2008-07-21 13:12+0100\n"
+"Last-Translator: Martin Bagge <brother at bsnet.se>\n"
+"Language-Team: swedish <sv at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Swedish\n"
+"X-Poedit-Country: SWEDEN\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Vill du verkligen nedgradera?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Filen /var/lib/mysql/debian-*.flag existerar."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+"Detta betyder att paketet mysql-server med högre versionsnummer har "
+"installerats tidigare."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+"Det finns inga garantier att versionen du installerar kan använda de "
+"existerande databaserna."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "Viktig notering för NIS/YP-användare!"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+"För att kunna använda MySQL behöver följande poster för användare och "
+"grupper adderas till systemet:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+"Du bör också kontrollera rättigheter och ägare av katalogen /var/lib/mysql:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Ta bort alla MySQL-databaser?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+"Katalogen /var/lib/mysql, som innehåller alla MySQL-databaser, kommer att "
+"tas bort."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+"Scriptet kommer strax ta bort data-katalogen /var/lib/mysql. Om det "
+"planerade var att bara installera en högre MySQL-version eller om ett annan "
+"mysql-server paket redan använde det, skall datan sparas."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "Ska MySQL startas när systemet startar upp?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+"MySQL kan startas när systemet startas upp eller endast om du manuellt "
+"skriver '/etc/init.d/mysql start'."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Nytt lösenord för MySQLs \"root\"-användare:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+"Det är starkt rekommenderat att du sätter ett lösenord för MySQLs "
+"administrativa \"root\"-användare."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Om fältet lämnas tomt kommer lösenordet inte att ändras."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Nytt lösenord för MySQLs \"root\"-användare:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Lyckades inte sätta lösenord för MySQLs \"root\"-användare"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+"Det verkar som ett fel uppstod när det skulle sättas ett lösenord för MySQLs "
+"administrativa användare. Detta kan ha skett för att användaren redan har "
+"ett lösenord satt, eller på grund av problem med att kommunicera med MySQL-"
+"servern."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Du bör kontrollera kontots lösenord efter installationen."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr "Se /usr/share/doc/mysql-server-5.0/README.Debian för mer information."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Fel i lösenordskontroll"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Lösenorden du angav överrensstämde inte. Vänligen försök igen."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+"Behöver du MySQL-anslutningar från system som kör Debian \"Sarge\" eller "
+"äldre?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""
+"Sättet som lösenorden lagrades på var inte särskilt säkert. Detta har "
+"förbättrats på bekostnad av att klienter (t.ex. PHP) från system som kör "
+"Debian 3.1 Sarge inte kan ansluta till konton som är nya eller vars lösenord "
+"har ändrats. Se /usr/share/doc/mysql-server-5.0/README.Debian."

Added: mysql-dfsg-5.0/branches/unstable/debian/po/templates.pot
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/templates.pot	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/templates.pot	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,189 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-12-22 11:02+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr ""
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001 ../mysql-server-5.0.templates:10001
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr ""

Added: mysql-dfsg-5.0/branches/unstable/debian/po/tr.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/tr.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/tr.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,297 @@
+# Turkish translation of mysql-server.
+# This file is distributed under the same license as the mysql-server package.
+# Gürkan Aslan <gurkan at iaslan.com>, 2004
+# Mert Dirik <mertdirik at gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-05-08 20:05+0200\n"
+"PO-Revision-Date: 2008-06-06 00:50+0200\n"
+"Last-Translator: Mert Dirik <mertdirik at gmail.com>\n"
+"Language-Team: Turkish <debian-l10n-turkish at lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Really proceed with downgrade?"
+msgstr "Sürüm düşürme (downgrade) işlemine gerçekten devam edilsin mi?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Sisteminizde /var/lib/mysql/debian-*.flag adlı bir dosya mevcut."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "Such file is an indication that a mysql-server package with a higher version has been installed earlier."
+msgstr "Bunun gibi dosyalar sisteminize bundan önce daha yüksek sürümlü bir mysql-server paketinin kurulduğunun belirtisidir."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:2001
+msgid "There is no guarantee that the version you're currently installing will be able to use the current databases."
+msgstr "Şu anda kurmakta olduğunuz sürümün hali hazırdaki veritabanlarını kullanabileceğinin garantisi yoktur."
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "Important note for NIS/YP users"
+msgstr "NIS/YP kullanıcıları için önemli not"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "To use MySQL, the following entries for users and groups should be added to the system:"
+msgstr "MySQL'i kullanabilmek için, aşağıdaki kullanıcı ve grup girdileri sisteme eklenmelidir:"
+
+#. Type: note
+#. Description
+#: ../mysql-server-5.0.templates:3001
+msgid "You should also check the permissions and the owner of the /var/lib/mysql directory:"
+msgstr "Ayrıca /var/lib/mysql dizininin sahibini ve izinlerini de kontrol etmelisiniz:"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "Remove all MySQL databases?"
+msgstr "Tüm MySQL veritabanları silinsin mi?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "The /var/lib/mysql directory which contains the MySQL databases is about to be removed."
+msgstr "MySQL veritabanlarını barındıran /var/lib/mysql dizini silinmek üzere."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:4001
+msgid "If you're removing the MySQL package in order to later install a more recent version or if a different mysql-server package is already using it, the data should be kept."
+msgstr "Eğer MySQL paketini daha sonra daha yeni bir sürümünü kurmak için kaldırıyorsanız, ya da farklı bir mysql-server paketi bu verileri halen kullanıyorsa, bu veriler korunmalıdır."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "Start the MySQL server on boot?"
+msgstr "MySQL sunucusu açılış sırasında başlatılsın mı?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:5001
+msgid "The MySQL server can be launched automatically at boot time or manually with the '/etc/init.d/mysql start' command."
+msgstr "MySQL sunucusu açılış sırasında otomatik olarak ya da '/etc/init.d/mysql start' komutunu vermeniz halinde elle başlatılabilir."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "New password for the MySQL \"root\" user:"
+msgstr "MySQL \"root\" kullanıcısının yeni parolası:"
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "While not mandatory, it is highly recommended that you set a password for the MySQL administrative \"root\" user."
+msgstr "Zorunlu olmasa da, MySQL'in yönetimsel \"root\" kullanıcısı için parola ayarlamanız şiddetle tavsiye edilir."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:6001
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Bu alan boş bırakılırsa parola değiştirilmeyecek."
+
+#. Type: password
+#. Description
+#: ../mysql-server-5.0.templates:7001
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "MySQL \"root\" kullanıcısının parolasını tekrarlayın:"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "MySQL \"root\" kullanıcısının parolası ayarlanamadı"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server."
+msgstr "MySQL yönetimsel kullanıcısının parolası ayarlanırken bir hata oluştu. Bunun nedeni hesabın zaten bir parolaya sahip olması ya da MySQL sunucusuyla yaşanan bir bağlantı problemi olabilir."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:8001
+msgid "You should check the account's password after the package installation."
+msgstr "Paket kurulumundan sonra hesabın parolasını kontrol etmelisiniz."
+
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:8001
+#: ../mysql-server-5.0.templates:10001
+msgid "Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more information."
+msgstr "Daha fazla bilgi için lütfen /usr/share/doc/mysql-server-5.0/README.Debian dosyasını okuyun."
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "Password input error"
+msgstr "Parola giriş hatası"
+
+#. Type: error
+#. Description
+#: ../mysql-server-5.0.templates:9001
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Girdiğiniz iki parola aynı değildi. Lütfen tekrar deneyin."
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr "Debian \"sarge\" ya da daha eski makinelerden yapılan MySQL bağlantıları desteklensin mi?"
+
+#. Type: boolean
+#. Description
+#: ../mysql-server-5.0.templates:10001
+msgid "In old versions of MySQL clients on Debian, passwords were not stored securely. This has been improved since then, however clients (such as PHP) from hosts running Debian 3.1 Sarge will not be able to connect to recent accounts or accounts whose password have been changed."
+msgstr "Debian'daki MySQL istemcilerinin eski sürümlerinde parolalar güvenli bir biçimde saklanmıyordu.  Bu durum artık düzeldi, bununla birlikte Debian 3.1 Sarge kullanan makinelerdeki istemciler (PHP gibi) artık yeni hesaplara ya da parolası değiştirilmiş olan hesaplara bağlanamayacak."
+
+#~ msgid ""
+#~ "To use mysql you must install an equivalent user and group to the "
+#~ "following and ensure yourself that /var/lib/mysql has the right "
+#~ "permissions (the uid/gid may be different)."
+#~ msgstr ""
+#~ "Mysql'i kullanmak için aşağıdakiyle eşdeğer bir kullanıcı ve grup "
+#~ "tanımlamalı, ve /var/lib/mysql izinlerinin uygun şekilde ayarlandığından "
+#~ "emin olmalısınız (uid/gid farklı olabilir)."
+#~ msgid ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgstr ""
+#~ "/etc/passwd:      mysql:x:100:101:MySQL Server:/var/lib/mysql:/bin/false"
+#~ msgid "/etc/group:       mysql:x:101:"
+#~ msgstr "/etc/group:       mysql:x:101:"
+#~ msgid "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+#~ msgstr "/var/lib/mysql:   drwxr-xr-x   mysql    mysql"
+
+#, fuzzy
+#~ msgid "Please also read http://www.mysql.com/doc/en/Upgrade.html"
+#~ msgstr "Lütfen http://www.mysql.com/doc/en/Upgrade.html belgesini okuyun"
+
+#, fuzzy
+#~ msgid ""
+#~ "MySQL will only install if you have a non-numeric hostname that is "
+#~ "resolvable via the /etc/hosts file. E.g. if the \"hostname\" command "
+#~ "returns \"myhostname\" then there must be a line like \"10.0.0.1 "
+#~ "myhostname\"."
+#~ msgstr ""
+#~ "MySQL sadece /etc/hosts dosyası yoluyla çözülebilir NUMERİK OLMAYAN bir "
+#~ "makine adına sahipseniz kurulacaktır. Örneğin, eğer \"hostname\" komutu "
+#~ "\"makinem\" ismini döndürüyorsa, bu dosya içinde \"10.0.0.1 makinem\" "
+#~ "gibi bir satır olmalıdır."
+
+#, fuzzy
+#~ msgid ""
+#~ "A new mysql user \"debian-sys-maint\" will be created. This mysql account "
+#~ "is used in the start/stop and cron scripts. Don't delete."
+#~ msgstr ""
+#~ "Yeni mysql kullanıcısı \"debian-sys-maint\" yaratılacak. Bu hesap, "
+#~ "başlangıç betiklerinde ve cron içinde kullanılıyor. Bu hesabı silmeyin."
+
+#, fuzzy
+#~ msgid ""
+#~ "Please remember to set a PASSWORD for the MySQL root user! If you use a /"
+#~ "root/.my.cnf, always write the \"user\" and the \"password\" lines in "
+#~ "there, never only the password!"
+#~ msgstr ""
+#~ "Lütfen MySQL root kullanıcısı için bir PAROLA girmeyi unutmayın! Eğer /"
+#~ "root/.my.cnf kullanıyorsanız, \"user\" ve \"password\" satırlarını her "
+#~ "zaman buraya ekleyin, sadece parolayı değil! Daha fazla bilgi için /usr/"
+#~ "share/doc/mysql-server/README.Debian dosyasını okuyun."
+
+#, fuzzy
+#~ msgid ""
+#~ "Should I remove all databases below /var/lib/mysql as you are purging the "
+#~ "mysql-server package?"
+#~ msgstr ""
+#~ "mysql-server paketi kaldırıldıktan sonra bütün veritabanları silinsin mi?"
+#~ msgid ""
+#~ "Networking is disabled by default for security reasons. You can enable it "
+#~ "by commenting out the skip-networking option in /etc/mysql/my.cnf."
+#~ msgstr ""
+#~ "Ağ, öntanımlı olarak güvenlik gerekçeleriyle devre dışı bırakıldı. Bu "
+#~ "özelliği /etc/mysql/my.cnf dosyası içindeki \"skip-networking\" "
+#~ "seçeneğini kaldırarak etkinleştirebilirsiniz."
+#~ msgid "security and update notice"
+#~ msgstr "güvenlik ve güncelleme duyurusu"
+#~ msgid ""
+#~ "Should I remove everything below /var/lib/mysql when you purge the mysql-"
+#~ "server package with the \"dpkg --purge mysql-server\" command (i.e. "
+#~ "remove everything including the configuration) somewhen? (default is not)"
+#~ msgstr ""
+#~ "mysql-server paketini temizlemek için \"dpkg --purge mysql-server\" "
+#~ "komutunu kullandığınızda (yani yapılandırma dahil herşeyi silmek) /var/"
+#~ "lib/mysql altındaki herşeyi sileyim mi? (öntanımlı cevap hayır'dır)."
+#~ msgid "Please run mysql_fix_privilege_tables !"
+#~ msgstr "Lütfen mysql_fix_privilege_tables komutunu çalıştırın!"
+#~ msgid ""
+#~ "I will ensure secure permissions of /var/lib/mysql by replacing GIDs "
+#~ "other than root and mysql with mysql."
+#~ msgstr ""
+#~ "/var/lib/mysql'in izinlerinin güvenli olmasını sağlamak amacıyla, buna "
+#~ "ait GID'leri root ve mysql'den farklı olacak şekilde değiştireceğim."
+#~ msgid ""
+#~ "Instructions how to enable SSL support are in /usr/share/doc/mysql-server/"
+#~ msgstr ""
+#~ "SSL desteğini nasıl etkinleştirebileceğinize ilişkin talimatlar /usr/"
+#~ "share/doc/mysql-server/ içinde."
+#~ msgid "mysql_fix_privileges_tables will be executed"
+#~ msgstr "mysql_fix_privileges_tables çalıştırılacak"
+#~ msgid ""
+#~ "The latest MySQL versions have an enhanced, more fine grained, privilege "
+#~ "system. To make use of it, some new fields must be added to the tables "
+#~ "in  the \"mysql\" database. This is done by the "
+#~ "mysql_fix_privilege_tables script during this upgrade regardless of if "
+#~ "the server is currently running or not!"
+#~ msgstr ""
+#~ "En son MySQL sürümleri zenginleştirilmiş, daha ayrıntılandırılmış bir "
+#~ "ayrıcalık (privilege) sistemine sahiptir. Yeni sistemi kullanmak için, "
+#~ "\"mysql\" veritabanındaki tablolara bazı yeni alanlar eklenmelidir. Bu "
+#~ "işlem, sunucunun çalışıp çalışmamasına bağlı olmaksızın "
+#~ "mysql_fix_privilege_tables betiği tarafından bu yükseltme sırasında "
+#~ "yapılır."
+#~ msgid ""
+#~ "This script is not supposed to give any user more rights that he had "
+#~ "before, if you encounter such a case, please contact me."
+#~ msgstr ""
+#~ "Bu betiğin hiç bir kullanıcıya öncekinden daha fazla hak kazandırmadığı "
+#~ "varsayılıyor. Eğer bunun aksinde bir durumla karşılaşırsanız, lütfen "
+#~ "benimle bağlantıya geçin."
+#~ msgid "Make MySQL reachable via network?"
+#~ msgstr "MySQL network üzerinden ulaşılabilir olsun mu?"
+#~ msgid ""
+#~ "Should MySQL listen on a network reachable TCP port? This is not "
+#~ "necessary for use on a single computer and could be a security problem."
+#~ msgstr ""
+#~ "MySQL ağ üzerinde ulaşılabilen bir TCP portunu dinlesin mi? Tek olan bir "
+#~ "bilgisayar için bu ayar gerekli değildir ve bir güvenlik sorunu "
+#~ "oluÅŸturabilir."
+#~ msgid "Enable chroot mode?"
+#~ msgstr "chroot kipi etkinleÅŸtirilsin mi?"
+#~ msgid ""
+#~ "MySQL is able to jail itself into the /var/lib/mysql_jail directory so "
+#~ "that users cannot modify any files outside this directory. This improves "
+#~ "resistence against crackers, too, as they are not able to modify system "
+#~ "files."
+#~ msgstr ""
+#~ "MySQL kendini /var/lib/mysql_jail dizinine hapsederek kullanıcıların bu "
+#~ "dizin dışındaki hiç bir dosyayı değiştirmemesini sağlayabilir. Bu "
+#~ "düzenleme, sistem dosyalarını değiştirmelerini engelleyeceğinden, "
+#~ "cracker'lara karşı dayanıklılığı arttırır."
+

Added: mysql-dfsg-5.0/branches/unstable/debian/po/vi.po
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/po/vi.po	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/po/vi.po	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,190 @@
+# Vietnamese translation for MySQL DFSG 5.0.
+# Copyright © 2008 Free Software Foundation, Inc.
+# Clytie Siddall <clytie at riverland.net.au>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mysql-dfsg-5.0\n"
+"Report-Msgid-Bugs-To: mysql-dfsg-5.0 at packages.debian.org\n"
+"POT-Creation-Date: 2008-06-06 08:49+0200\n"
+"PO-Revision-Date: 2008-06-16 15:34+0930\n"
+"Last-Translator: Clytie Siddall <clytie at riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN at googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: LocFactoryEditor 1.7b3\n"
+
+#: ../mysql-server-5.0.templates:2001
+#. Type: boolean
+#. Description
+msgid "Really proceed with downgrade?"
+msgstr "Thực sự tiếp tục hạ cấp không?"
+
+#: ../mysql-server-5.0.templates:2001
+#. Type: boolean
+#. Description
+msgid "A file named /var/lib/mysql/debian-*.flag exists on this system."
+msgstr "Một tập tin tên « /var/lib/mysql/debian-*.flag » đã có trên hệ thống này."
+
+#: ../mysql-server-5.0.templates:2001
+#. Type: boolean
+#. Description
+msgid ""
+"Such file is an indication that a mysql-server package with a higher version "
+"has been installed earlier."
+msgstr "Tập tin như vậy ngụ ý rằng một gói trình phục vụ MySQL (mysql-server) phiên bản mới hơn đã được cài đặt về trước."
+
+#: ../mysql-server-5.0.templates:2001
+#. Type: boolean
+#. Description
+msgid ""
+"There is no guarantee that the version you're currently installing will be "
+"able to use the current databases."
+msgstr "Không thể đảm bảo rằng phiên bản bạn đang cài đặt sẽ có khả năng sử dụng những cơ sở dữ liệu hiện thời."
+
+#: ../mysql-server-5.0.templates:3001
+#. Type: note
+#. Description
+msgid "Important note for NIS/YP users"
+msgstr "CHÚ Ý : người dùng NIS/YP"
+
+#: ../mysql-server-5.0.templates:3001
+#. Type: note
+#. Description
+msgid ""
+"To use MySQL, the following entries for users and groups should be added to "
+"the system:"
+msgstr "Để sử dụng phần mềm MySQL, những mục nhập theo đây về người dùng và nhóm đều nên được thêm vào hệ thống:"
+
+#: ../mysql-server-5.0.templates:3001
+#. Type: note
+#. Description
+msgid ""
+"You should also check the permissions and the owner of the /var/lib/mysql "
+"directory:"
+msgstr "Bạn cũng nên kiểm tra quyền hạn và chủ có thư mục « /var/lib/mysql »."
+
+#: ../mysql-server-5.0.templates:4001
+#. Type: boolean
+#. Description
+msgid "Remove all MySQL databases?"
+msgstr "Gỡ bỏ mọi cơ sở dữ liệu MySQL không?"
+
+#: ../mysql-server-5.0.templates:4001
+#. Type: boolean
+#. Description
+msgid ""
+"The /var/lib/mysql directory which contains the MySQL databases is about to "
+"be removed."
+msgstr "Thư mục « /var/lib/mysql » chứa các cơ sở dữ liệu MySQL sắp bị gỡ bỏ."
+
+#: ../mysql-server-5.0.templates:4001
+#. Type: boolean
+#. Description
+msgid ""
+"If you're removing the MySQL package in order to later install a more recent "
+"version or if a different mysql-server package is already using it, the data "
+"should be kept."
+msgstr "Nếu bạn muốn gỡ bỏ gói MySQL để cài đặt về sau một phiên bản mới hơn, hoặc nếu một gói trình phục vụ MySQL (mysql-server) khác đang sử dụng nó, dữ liệu này nên được giữ lại."
+
+#: ../mysql-server-5.0.templates:5001
+#. Type: boolean
+#. Description
+msgid "Start the MySQL server on boot?"
+msgstr "Khởi chạy trình phục vụ MySQL khi khởi động máy không?"
+
+#: ../mysql-server-5.0.templates:5001
+#. Type: boolean
+#. Description
+msgid ""
+"The MySQL server can be launched automatically at boot time or manually with "
+"the '/etc/init.d/mysql start' command."
+msgstr "Trình phục vụ MySQL có thể được tự động khởi chạy vào lúc khởi động máy, hoặc khởi chạy thủ công dùng câu lệnh « /etc/init.d/mysql start »."
+
+#: ../mysql-server-5.0.templates:6001
+#. Type: password
+#. Description
+msgid "New password for the MySQL \"root\" user:"
+msgstr "Mật khẩu mới cho người dùng MySQL « root »:"
+
+#: ../mysql-server-5.0.templates:6001
+#. Type: password
+#. Description
+msgid ""
+"While not mandatory, it is highly recommended that you set a password for "
+"the MySQL administrative \"root\" user."
+msgstr "Dù không phải bắt buộc, rất khuyên bạn đặt một mật khẩu cho người dùng MySQL « root » quản trị."
+
+#: ../mysql-server-5.0.templates:6001
+#. Type: password
+#. Description
+msgid "If that field is left blank, the password will not be changed."
+msgstr "Bỏ trống trường này thì mật khẩu sẽ không thay đổi."
+
+#: ../mysql-server-5.0.templates:7001
+#. Type: password
+#. Description
+msgid "Repeat password for the MySQL \"root\" user:"
+msgstr "Nhập lại mật khẩu cho người dùng MySQL « root »:"
+
+#: ../mysql-server-5.0.templates:8001
+#. Type: error
+#. Description
+msgid "Unable to set password for the MySQL \"root\" user"
+msgstr "Không thể đặt mật khẩu cho người dùng MySQL « root »"
+
+#: ../mysql-server-5.0.templates:8001
+#. Type: error
+#. Description
+msgid ""
+"An error occurred while setting the password for the MySQL administrative "
+"user. This may have happened because the account already has a password, or "
+"because of a communication problem with the MySQL server."
+msgstr "Gặp lỗi trong khi đặt mật khẩu cho người dùng MySQL quản trị. Trường hợp này có thể xảy ra vì tài khoản đã có một mật khẩu, hoặc do một vấn đề liên lạc với trình phục vụ MySQL."
+
+#: ../mysql-server-5.0.templates:8001
+#. Type: error
+#. Description
+msgid "You should check the account's password after the package installation."
+msgstr "Sau khi cài đặt gói này thì bạn nên kiểm tra mật khẩu của tài khoản."
+
+#: ../mysql-server-5.0.templates:8001
+#: ../mysql-server-5.0.templates:10001
+#. Type: error
+#. Description
+#. Type: boolean
+#. Description
+msgid ""
+"Please read the /usr/share/doc/mysql-server-5.0/README.Debian file for more "
+"information."
+msgstr "Hãy đọc tài liệu Đọc Đi « /usr/share/doc/mysql-server-5.0/README.Debian » để tìm thêm thông tin."
+
+#: ../mysql-server-5.0.templates:9001
+#. Type: error
+#. Description
+msgid "Password input error"
+msgstr "Lỗi nhập mật khẩu"
+
+#: ../mysql-server-5.0.templates:9001
+#. Type: error
+#. Description
+msgid "The two passwords you entered were not the same. Please try again."
+msgstr "Bạn đã nhập hai mật khẩu không trùng. Hãy thử lại."
+
+#: ../mysql-server-5.0.templates:10001
+#. Type: boolean
+#. Description
+msgid "Support MySQL connections from hosts running Debian \"sarge\" or older?"
+msgstr "Hỗ trợ kết nối MySQL từ máy chạy Debian « sarge » hay cũ hơn không?"
+
+#: ../mysql-server-5.0.templates:10001
+#. Type: boolean
+#. Description
+msgid ""
+"In old versions of MySQL clients on Debian, passwords were not stored "
+"securely. This has been improved since then, however clients (such as PHP) "
+"from hosts running Debian 3.1 Sarge will not be able to connect to recent "
+"accounts or accounts whose password have been changed."
+msgstr "Trong phiên bản cũ của ứng dụng khách MySQL trên Debian, mật khẩu không được chứa bảo mật. Trường hợp này đã cải tiến kể từ lúc đó, tuy nhiên ứng dụng khách (v.d. PHP) từ máy chạy Debian 3.1 (Sarge) sẽ không thể kết nối tới tài khoản vừa tạo hay tài khoản có mật khẩu đã thay đổi."

Added: mysql-dfsg-5.0/branches/unstable/debian/rules
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/rules	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/rules	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,349 @@
+#!/usr/bin/make -f
+
+export DH_VERBOSE=1
+
+PACKAGE=mysql-dfsg-5.0
+
+include /usr/share/dpatch/dpatch.make
+
+TMP=$(CURDIR)/debian/tmp/
+
+ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ARCH_OS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEBVERSION = $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }' | sed 's/^.*-//' )
+
+DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
+DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
+DEB_NOEPOCH_VERSION ?= $(shell echo $(DEB_VERSION) | cut -d: -f2-)
+DEB_UPSTREAM_VERSION ?= $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
+DEB_UPSTREAM_VERSION_MAJOR_MINOR := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -r -n 's/^([0-9]+\.[0-9]+).*/\1/p')
+
+DISTRIBUTION = $(shell lsb_release -i -s)
+
+MAKE_J = -j$(shell if [ -f /proc/cpuinfo ] ; then grep -c processor.* /proc/cpuinfo ; else echo 1 ; fi)
+ifeq (${MAKE_J}, -j0)
+  MAKE_J = -j1
+endif
+
+MAKE_TEST_TARGET=test-force
+ifneq ($(findstring $(DEB_BUILD_OPTIONS),fulltest),)
+# make test-bt is the testsuite run by the MySQL build team 
+# before a release, but it is long
+    MAKE_TEST_TARGET=test-bt
+endif
+
+ifeq ($(findstring $(ARCH),i386 sparc),$(ARCH))
+    USE_ASSEMBLER=--enable-assembler 
+endif
+
+ifneq ($(findstring $(ARCH), alpha arm armel hppa mipsel powerpc sparc),)
+   TESTSUITE_FAIL_CMD=true
+else
+   TESTSUITE_FAIL_CMD=exit 1
+endif
+
+# This causes seg11 crashes if LDAP is used for groups in /etc/nsswitch.conf
+# so it is disabled by default although, according to MySQL, it brings >10%
+# performance gain if enabled. See #299382.
+ifeq ($(STATIC_MYSQLD), 1)
+    USE_STATIC_MYSQLD=--with-mysqld-ldflags=-all-static
+endif
+		
+configure: patch configure-stamp
+configure-stamp:
+	@echo "RULES.configure-stamp"
+	dh_testdir
+
+ifneq ($(ARCH_OS),hurd)
+	if [ ! -d /proc/self ]; then echo "/proc IS NEEDED" 1>&2; exit 1; fi 
+endif
+
+	sh -c  'PATH=$${MYSQL_BUILD_PATH:-"/bin:/usr/bin"} \
+		CC=$${MYSQL_BUILD_CC:-gcc} \
+	    	CFLAGS=$${MYSQL_BUILD_CFLAGS:-"-DBIG_JOINS=1 -O2 -fPIC"} \
+		CXX=$${MYSQL_BUILD_CXX:-g++} \
+	    	CXXFLAGS=$${MYSQL_BUILD_CXXFLAGS:-"-DBIG_JOINS=1 -felide-constructors -fno-rtti -O2"} \
+	    ./configure \
+		--build=${DEB_BUILD_GNU_TYPE} \
+		--host=${DEB_HOST_GNU_TYPE} \
+		\
+		--prefix=/usr \
+	        --exec-prefix=/usr \
+	        --libexecdir=/usr/sbin \
+	        --datadir=/usr/share \
+	        --localstatedir=/var/lib/mysql \
+	        --includedir=/usr/include \
+	        --infodir=/usr/share/info \
+	        --mandir=/usr/share/man \
+		\
+		--with-server-suffix="-$(DEBVERSION)" \
+		--with-comment="($(DISTRIBUTION))" \
+                --with-system-type="debian-linux-gnu" \
+		\
+		--enable-shared \
+		--enable-static \
+		--enable-thread-safe-client \
+	        $(USE_ASSEMBLER) \
+		--enable-local-infile \
+		\
+                --with-big-tables \
+		--with-unix-socket-path=/var/run/mysqld/mysqld.sock \
+	       	--with-mysqld-user=mysql \
+		--with-libwrap \
+		$(USE_STATIC_MYSQLD) \
+		--without-openssl \
+		--with-yassl \
+	    	--without-docs \
+		--with-bench \
+		--without-readline \
+		--with-extra-charsets=all \
+		--with-innodb \
+		\
+		--with-archive-storage-engine \
+		--with-csv-storage-engine \
+		--with-federated-storage-engine \
+		--with-blackhole-storage-engine \
+		--with-sphinx-storage-engine \
+		--without-embedded-server \
+		--with-ndbcluster \
+		--with-ndb-ccflags="-fPIC" \
+		--with-ndb-shm \
+		--without-ndb-sci \
+		--without-ndb-test \
+		--with-embedded-server \
+		--with-embedded-privilege-control \
+		--without-ndb-docs'
+
+	#	--sysconfdir=/etc/mysql 	-- Appends /etc/mysql after ~/ in the my.cnf search path!
+	#	--with-embedded-server \
+	#	--with-embedded-privilege-control \
+	#	--with-debug \
+	#	--with-mysqlfs 	 # does not build, no toplevel fs/ directory! Needs CORBA.
+	
+	touch configure-stamp
+
+
+build: build-stamp
+build-stamp: configure
+	dh_testdir
+
+	$(MAKE) $(MAKE_J)
+
+ifeq ($(findstring $(DEB_BUILD_OPTIONS),nocheck),)
+	if [ ! -f testsuite-stamp ] ; then \
+		$(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
+	fi
+endif
+
+	touch testsuite-stamp
+
+	touch build-stamp
+	
+
+clean: clean-patched unpatch
+	rm -rf debian/patched
+clean-patched:
+	@echo "RULES.clean-patched"
+	dh_testdir 
+	dh_testroot
+	rm -f configure-stamp
+	rm -f build-stamp
+	rm -f testsuite-stamp
+	
+	[ ! -f Makefile ] || $(MAKE) clean
+	[ ! -d mysql-test/var ] || rm -rf mysql-test/var
+
+	# We like to see how long this is neccessary
+	@echo "CRUFT BEGIN" 
+	@find -type l -print0 | xargs --no-run-if-empty -0 rm -v
+	@find -name .deps -type d -print0 | xargs --no-run-if-empty -0 rm -rfv
+	@rm -vrf ndb/docs/.doxy* ndb/docs/*html ndb/docs/*pdf innobase/autom4te.cache
+	@for i in \
+	  readline/Makefile \
+	  sql-bench/Makefile \
+	  scripts/make_win_binary_distribution \
+	  scripts/mysql_explain_log \
+	  scripts/mysql_tableinfo \
+	  scripts/mysqlbug \
+	  sql/gen_lex_hash \
+	  sql/lex_hash.h \
+	  strings/ctype_autoconf.c \
+	  config.log \
+	  config.cache \
+	  ; \
+	do \
+	  rm -vf $$i; \
+	done
+	@echo "CRUFT END"
+
+	debconf-updatepo
+	dh_clean -v
+
+	
+install:
+install: build
+	@echo "RULES.install"
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# this is stupid, if mysql-server symlinks point to something in the
+	# mysql-client package they get not compressed and end up stale
+	mkdir -p $(TMP)/usr/share/man/man1/
+	mkdir -p $(TMP)/usr/share/man/man8/
+	cp debian/additions/manpages/*.1 $(TMP)/usr/share/man/man1/
+
+	# make install (trailing slash needed for innobase)
+	$(MAKE) install DESTDIR=$(TMP)/
+		
+	# After installing, remove rpath to make lintian happy.
+	set +e; \
+	find ./debian/tmp/ -type f -print0 \
+		| xargs -0 --no-run-if-empty chrpath -k 2>/dev/null \
+		| fgrep RPATH= \
+		| cut -d: -f 1 \
+		| xargs --no-run-if-empty chrpath -d; \
+	set -e
+
+	# libmysqlclient: move shared libraries (but not the rest like libheap.a & co)
+	mv $(TMP)/usr/lib/mysql/libmysqlclient* $(TMP)/usr/lib
+	perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient.la
+	perl -pi -e 's#/usr/lib/mysql#/usr/lib#' $(TMP)/usr/lib/libmysqlclient_r.la
+	# Check if our beloved versioned symbols are really there
+	if [ "`objdump -T $(TMP)/usr/lib/libmysqlclient.so.15.0.0 | grep -c libmysqlclient_15`" -lt 500 ]; then \
+	  echo "ERROR: versioned symbols are absent"; \
+	  exit 1; \
+	fi     
+
+	# libmysqlclient-dev: forgotten header file since 3.23.25?
+	cp include/my_config.h $(TMP)/usr/include/mysql/
+	cp include/my_dir.h $(TMP)/usr/include/mysql/
+
+	# mysql-common: We now provide our own config file.
+	install -d $(TMP)/etc/mysql
+	install -m 0644 debian/additions/my.cnf $(TMP)/etc/mysql/my.cnf
+
+	# mysql-client
+	install -m 0755 debian/additions/mysqlreport/mysqlreport $(TMP)/usr/bin/
+	install -m 0644 debian/additions/mysqlreport/mysqlreport.1 $(TMP)/usr/share/man/man1/
+	install -m 0755 debian/additions/innotop/innotop $(TMP)/usr/bin/
+	install -m 0644 debian/additions/innotop/innotop.1 $(TMP)/usr/share/man/man1/
+	install -m 0644 -D debian/additions/innotop/InnoDBParser.pm $(TMP)/usr/share/perl5/InnoDBParser.pm
+
+	# mysql-server
+	install -m 0755 scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
+	mkdir -p $(TMP)/usr/share/doc/mysql-server-5.0/examples
+	mv $(TMP)/usr/share/mysql/*cnf 	    $(TMP)/usr/share/doc/mysql-server-5.0/examples/
+	rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
+	       $(TMP)/usr/share/mysql/mysql-log-rotate \
+	       $(TMP)/usr/share/mysql/mysql.server \
+	       $(TMP)/usr/share/mysql/binary-configure
+	nm -n sql/mysqld |gzip -9 > $(TMP)/usr/share/doc/mysql-server-5.0/mysqld.sym.gz
+	install -m 0644 debian/additions/ndb_mgmd.cnf $(TMP)/usr/share/doc/mysql-server-5.0/examples/
+	install -m 0755 debian/additions/echo_stderr $(TMP)/usr/share/mysql/
+	install -m 0755 debian/additions/debian-start $(TMP)/etc/mysql/
+	install -m 0755 debian/additions/debian-start.inc.sh $(TMP)/usr/share/mysql/
+	sed "s#filename => 'ndb_size.tmpl#filename => '/usr/share/mysql/ndb_size.tmpl#" < $(TMP)/usr/bin/ndb_size.pl > $(TMP)/usr/bin/ndb_size
+	mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql/
+	mv $(TMP)/usr/sql-bench $(TMP)/usr/share/mysql/
+	# lintian overrides
+	mkdir -p $(TMP)/usr/share/lintian/overrides/
+	cp debian/mysql-server-5.0.lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-server-5.0
+	cp debian/mysql-client-5.0.lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-client-5.0
+	cp debian/libmysqlclient15-dev.lintian-overrides $(TMP)/usr/share/lintian/overrides/libmysqlclient15-dev
+
+	# For 4.1 -> 5.0 transition
+	d=$(TMP)/usr/share/mysql-common/internal-use-only/; \
+	mkdir -p $$d; \
+	cp debian/mysql-server-5.0.mysql.init $$d/_etc_init.d_mysql; \
+	cp debian/mysql-server-5.0.mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \
+	cp debian/additions/debian-start $$d/_etc_mysql_debian-start
+
+	dh_movefiles
+	
+# Build architecture-independent files here.
+binary-indep: build install
+	@echo "RULES.binary-indep"
+	dh_testdir -i
+	dh_testroot -i
+	dh_installdebconf -i
+	dh_installdocs -i
+	dh_installexamples -i
+	dh_installmenu -i
+	dh_installlogrotate -i
+	dh_installinit -i
+	dh_installcron -i 
+	dh_installman -i
+	dh_installinfo -i
+	dh_installlogcheck -i
+	dh_installchangelogs -i
+	dh_link -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_perl -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+	
+# Build architecture-dependent files here.
+binary-arch: build install
+	@echo "RULES.binary-arch"
+	dh_testdir 
+	dh_testroot
+
+	dh_installdebconf -a
+	dh_installdocs -a
+	dh_installexamples -a
+	dh_installmenu -a
+	dh_installlogrotate -a --name mysql-server
+	# NDB needs to start before MySQL if they share a machine
+	# Neither should automatically restart on package install. There
+	# is a rolling order in which nodes in a cluster should be 
+	# restarted that is not possible to manage here.
+	dh_installinit -a -r --no-start --name=mysql-ndb-mgm -- defaults 17 23
+	dh_installinit -a -r --no-start --name=mysql-ndb -- defaults 18 22
+	# Start mysql in runlevel 19 before 20 where apache, proftpd etc gets
+	# started which might depend on a running database server.
+	dh_installinit -a --name=mysql -- defaults 19 21
+	dh_installcron -a --name mysql-server
+	dh_installman -a
+	dh_installinfo -a
+	dh_installlogcheck -a
+	dh_installchangelogs -a
+	dh_strip -a
+	dh_link -a	# .so muss nach .so.1.2.3 installier werden!
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -a
+	dh_makeshlibs -plibmysqlclient15off -V'libmysqlclient15off (>= 5.0.27-1)'
+	dh_installdeb -a
+	dh_perl -a
+	dh_shlibdeps -a -l debian/libmysqlclient15off/usr/lib -L libmysqlclient15off
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+source diff:
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary:	binary-indep binary-arch
+
+get-orig-source:
+	@wget -nv -T10 -t3 \
+	  -O /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz \
+	  http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-$(DEB_UPSTREAM_VERSION_MAJOR_MINOR)/mysql-$(DEB_UPSTREAM_VERSION).tar.gz
+	@tar xfz /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz -C /tmp
+	@rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/Docs
+	@rm -rf /tmp/mysql-$(DEB_UPSTREAM_VERSION)/debian
+	@mv /tmp/mysql-$(DEB_UPSTREAM_VERSION) /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
+	@cd /tmp ; tar czf $(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
+	@rm -f /tmp/mysql-$(DEB_UPSTREAM_VERSION).tar.gz
+	@rm -rf /tmp/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig
+	
+.PHONY: clean clean-patched configure build binary binary-indep binary-arch install patch unpatch
+
+# vim: ts=8

Added: mysql-dfsg-5.0/branches/unstable/debian/source.lintian-overrides
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/source.lintian-overrides	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/source.lintian-overrides	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,4 @@
+maintainer-script-lacks-debhelper-token debian/mysql-server-5.0.postinst
+maintainer-script-lacks-debhelper-token debian/mysql-server-5.0.postrm
+outdated-autotools-helper-file bdb/dist/config.sub 2002-07-03
+outdated-autotools-helper-file bdb/dist/config.guess 2002-07-23

Added: mysql-dfsg-5.0/branches/unstable/debian/watch
===================================================================
--- mysql-dfsg-5.0/branches/unstable/debian/watch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/unstable/debian/watch	2009-02-15 16:44:02 UTC (rev 1519)
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/-(rc|beta)/$1/" \
+  http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.0/mysql-([\d\.]*(?:-beta|-rc)?).tar.gz debian




More information about the Pkg-mysql-commits mailing list