From b04c4801b0529aebb39c8d9be95c123d2f3b7d46 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 4 Apr 2012 00:16:38 +0300 Subject: [PATCH 01/62] Created suites for heap, archive and csv. Moved test from main suite to the new suites. Move tests from maria/t and maria/r to maria mysql-test/mysql-test-run.pl: Added support for the new suites --- mysql-test/mysql-test-run.pl | 3 +++ mysql-test/{r => suite/archive}/archive-big.result | 0 mysql-test/{t => suite/archive}/archive-big.test | 0 mysql-test/{r => suite/archive}/archive.result | 0 mysql-test/{t => suite/archive}/archive.test | 0 mysql-test/{r => suite/archive}/archive_bitfield.result | 0 mysql-test/{t => suite/archive}/archive_bitfield.test | 0 mysql-test/{r => suite/archive}/archive_debug.result | 0 mysql-test/{t => suite/archive}/archive_debug.test | 0 mysql-test/{r => suite/archive}/archive_gis.result | 0 mysql-test/{t => suite/archive}/archive_gis.test | 0 mysql-test/{r => suite/archive}/archive_plugin.result | 0 mysql-test/{t => suite/archive}/archive_plugin.test | 0 .../{r => suite/archive}/mysqlhotcopy_archive.result | 0 .../{t => suite/archive}/mysqlhotcopy_archive.test | 0 mysql-test/{r => suite/archive}/partition_archive.result | 0 mysql-test/{t => suite/archive}/partition_archive.test | 0 mysql-test/suite/archive/suite.pm | 9 +++++++++ mysql-test/{r => suite/csv}/csv.result | 0 mysql-test/{t => suite/csv}/csv.test | 0 mysql-test/{r => suite/csv}/csv_alter_table.result | 0 mysql-test/{t => suite/csv}/csv_alter_table.test | 0 mysql-test/{r => suite/csv}/csv_not_null.result | 0 mysql-test/{t => suite/csv}/csv_not_null.test | 0 mysql-test/{r => suite/heap}/heap.result | 0 mysql-test/{t => suite/heap}/heap.test | 0 mysql-test/{r => suite/heap}/heap_auto_increment.result | 0 mysql-test/{t => suite/heap}/heap_auto_increment.test | 0 mysql-test/{r => suite/heap}/heap_btree.result | 0 mysql-test/{t => suite/heap}/heap_btree.test | 0 mysql-test/{r => suite/heap}/heap_hash.result | 0 mysql-test/{t => suite/heap}/heap_hash.test | 0 mysql-test/suite/maria/{t => }/compat_aliases-master.opt | 0 mysql-test/suite/maria/{r => }/group_commit.result | 0 mysql-test/suite/maria/{t => }/group_commit.test | 0 mysql-test/suite/maria/{r => }/locking.result | 0 mysql-test/suite/maria/{t => }/locking.test | 0 mysql-test/suite/maria/{r => }/maria-autozerofill.result | 0 mysql-test/suite/maria/{t => }/maria-autozerofill.test | 0 mysql-test/suite/maria/{r => }/maria-big.result | 0 mysql-test/suite/maria/{t => }/maria-big.test | 0 mysql-test/suite/maria/{r => }/maria-big2.result | 0 mysql-test/suite/maria/{t => }/maria-big2.test | 0 mysql-test/suite/maria/{r => }/maria-connect.result | 0 mysql-test/suite/maria/{t => }/maria-connect.test | 0 mysql-test/suite/maria/{t => }/maria-gis-recovery.opt | 0 mysql-test/suite/maria/{r => }/maria-gis-recovery.result | 0 mysql-test/suite/maria/{t => }/maria-gis-recovery.test | 0 .../suite/maria/{r => }/maria-gis-rtree-dynamic.result | 0 .../suite/maria/{t => }/maria-gis-rtree-dynamic.test | 0 .../suite/maria/{r => }/maria-gis-rtree-trans.result | 0 .../suite/maria/{t => }/maria-gis-rtree-trans.test | 0 mysql-test/suite/maria/{r => }/maria-gis-rtree.result | 0 mysql-test/suite/maria/{t => }/maria-gis-rtree.test | 0 mysql-test/suite/maria/{r => }/maria-mvcc.result | 0 mysql-test/suite/maria/{t => }/maria-mvcc.test | 0 mysql-test/suite/maria/{r => }/maria-no-logging.result | 0 mysql-test/suite/maria/{t => }/maria-no-logging.test | 0 .../suite/maria/{r => }/maria-page-checksum.result | 0 mysql-test/suite/maria/{t => }/maria-page-checksum.test | 0 mysql-test/suite/maria/{r => }/maria-partitioning.result | 0 mysql-test/suite/maria/{t => }/maria-partitioning.test | 0 mysql-test/suite/maria/{r => }/maria-preload.result | 0 mysql-test/suite/maria/{t => }/maria-preload.test | 0 mysql-test/suite/maria/{r => }/maria-purge.result | 0 mysql-test/suite/maria/{t => }/maria-purge.test | 0 mysql-test/suite/maria/{t => }/maria-recover-master.opt | 0 mysql-test/suite/maria/{r => }/maria-recover.result | 0 mysql-test/suite/maria/{t => }/maria-recover.test | 0 .../suite/maria/{t => }/maria-recovery-big-master.opt | 0 mysql-test/suite/maria/{r => }/maria-recovery-big.result | 0 mysql-test/suite/maria/{t => }/maria-recovery-big.test | 0 .../suite/maria/{t => }/maria-recovery-bitmap-master.opt | 0 .../suite/maria/{r => }/maria-recovery-bitmap.result | 0 .../suite/maria/{t => }/maria-recovery-bitmap.test | 0 mysql-test/suite/maria/{t => }/maria-recovery-master.opt | 0 .../maria/{t => }/maria-recovery-rtree-ft-master.opt | 0 .../suite/maria/{r => }/maria-recovery-rtree-ft.result | 0 .../suite/maria/{t => }/maria-recovery-rtree-ft.test | 0 mysql-test/suite/maria/{r => }/maria-recovery.result | 0 mysql-test/suite/maria/{t => }/maria-recovery.test | 0 .../suite/maria/{t => }/maria-recovery2-master.opt | 0 mysql-test/suite/maria/{r => }/maria-recovery2.result | 0 mysql-test/suite/maria/{t => }/maria-recovery2.test | 0 .../suite/maria/{t => }/maria-recovery3-master.opt | 0 mysql-test/suite/maria/{r => }/maria-recovery3.result | 0 mysql-test/suite/maria/{t => }/maria-recovery3.test | 0 mysql-test/suite/maria/{r => }/maria-ucs2.result | 0 mysql-test/suite/maria/{t => }/maria-ucs2.test | 0 mysql-test/suite/maria/{r => }/maria.result | 0 mysql-test/suite/maria/{t => }/maria.test | 0 mysql-test/suite/maria/{r => }/maria2.result | 0 mysql-test/suite/maria/{t => }/maria2.test | 0 mysql-test/suite/maria/{r => }/maria3.result | 0 mysql-test/suite/maria/{t => }/maria3.test | 0 mysql-test/suite/maria/{r => }/maria_notembedded.result | 0 mysql-test/suite/maria/{t => }/maria_notembedded.test | 0 mysql-test/suite/maria/{r => }/maria_partition.result | 0 mysql-test/suite/maria/{t => }/maria_partition.test | 0 .../suite/maria/{r => }/maria_showlog_error.result | 0 mysql-test/suite/maria/{t => }/maria_showlog_error.test | 0 mysql-test/suite/maria/{r => }/max_length.result | 0 mysql-test/suite/maria/{t => }/max_length.test | 0 mysql-test/suite/maria/{r => }/optimize.result | 0 mysql-test/suite/maria/{t => }/optimize.test | 0 mysql-test/suite/maria/{r => }/ps_maria.result | 0 mysql-test/suite/maria/{t => }/ps_maria.test | 0 .../suite/maria/{t => }/small_blocksize-master.opt | 0 mysql-test/suite/maria/{r => }/small_blocksize.result | 0 mysql-test/suite/maria/{t => }/small_blocksize.test | 0 110 files changed, 12 insertions(+) rename mysql-test/{r => suite/archive}/archive-big.result (100%) rename mysql-test/{t => suite/archive}/archive-big.test (100%) rename mysql-test/{r => suite/archive}/archive.result (100%) rename mysql-test/{t => suite/archive}/archive.test (100%) rename mysql-test/{r => suite/archive}/archive_bitfield.result (100%) rename mysql-test/{t => suite/archive}/archive_bitfield.test (100%) rename mysql-test/{r => suite/archive}/archive_debug.result (100%) rename mysql-test/{t => suite/archive}/archive_debug.test (100%) rename mysql-test/{r => suite/archive}/archive_gis.result (100%) rename mysql-test/{t => suite/archive}/archive_gis.test (100%) rename mysql-test/{r => suite/archive}/archive_plugin.result (100%) rename mysql-test/{t => suite/archive}/archive_plugin.test (100%) rename mysql-test/{r => suite/archive}/mysqlhotcopy_archive.result (100%) rename mysql-test/{t => suite/archive}/mysqlhotcopy_archive.test (100%) rename mysql-test/{r => suite/archive}/partition_archive.result (100%) rename mysql-test/{t => suite/archive}/partition_archive.test (100%) create mode 100644 mysql-test/suite/archive/suite.pm rename mysql-test/{r => suite/csv}/csv.result (100%) rename mysql-test/{t => suite/csv}/csv.test (100%) rename mysql-test/{r => suite/csv}/csv_alter_table.result (100%) rename mysql-test/{t => suite/csv}/csv_alter_table.test (100%) rename mysql-test/{r => suite/csv}/csv_not_null.result (100%) rename mysql-test/{t => suite/csv}/csv_not_null.test (100%) rename mysql-test/{r => suite/heap}/heap.result (100%) rename mysql-test/{t => suite/heap}/heap.test (100%) rename mysql-test/{r => suite/heap}/heap_auto_increment.result (100%) rename mysql-test/{t => suite/heap}/heap_auto_increment.test (100%) rename mysql-test/{r => suite/heap}/heap_btree.result (100%) rename mysql-test/{t => suite/heap}/heap_btree.test (100%) rename mysql-test/{r => suite/heap}/heap_hash.result (100%) rename mysql-test/{t => suite/heap}/heap_hash.test (100%) rename mysql-test/suite/maria/{t => }/compat_aliases-master.opt (100%) rename mysql-test/suite/maria/{r => }/group_commit.result (100%) rename mysql-test/suite/maria/{t => }/group_commit.test (100%) rename mysql-test/suite/maria/{r => }/locking.result (100%) rename mysql-test/suite/maria/{t => }/locking.test (100%) rename mysql-test/suite/maria/{r => }/maria-autozerofill.result (100%) rename mysql-test/suite/maria/{t => }/maria-autozerofill.test (100%) rename mysql-test/suite/maria/{r => }/maria-big.result (100%) rename mysql-test/suite/maria/{t => }/maria-big.test (100%) rename mysql-test/suite/maria/{r => }/maria-big2.result (100%) rename mysql-test/suite/maria/{t => }/maria-big2.test (100%) rename mysql-test/suite/maria/{r => }/maria-connect.result (100%) rename mysql-test/suite/maria/{t => }/maria-connect.test (100%) rename mysql-test/suite/maria/{t => }/maria-gis-recovery.opt (100%) rename mysql-test/suite/maria/{r => }/maria-gis-recovery.result (100%) rename mysql-test/suite/maria/{t => }/maria-gis-recovery.test (100%) rename mysql-test/suite/maria/{r => }/maria-gis-rtree-dynamic.result (100%) rename mysql-test/suite/maria/{t => }/maria-gis-rtree-dynamic.test (100%) rename mysql-test/suite/maria/{r => }/maria-gis-rtree-trans.result (100%) rename mysql-test/suite/maria/{t => }/maria-gis-rtree-trans.test (100%) rename mysql-test/suite/maria/{r => }/maria-gis-rtree.result (100%) rename mysql-test/suite/maria/{t => }/maria-gis-rtree.test (100%) rename mysql-test/suite/maria/{r => }/maria-mvcc.result (100%) rename mysql-test/suite/maria/{t => }/maria-mvcc.test (100%) rename mysql-test/suite/maria/{r => }/maria-no-logging.result (100%) rename mysql-test/suite/maria/{t => }/maria-no-logging.test (100%) rename mysql-test/suite/maria/{r => }/maria-page-checksum.result (100%) rename mysql-test/suite/maria/{t => }/maria-page-checksum.test (100%) rename mysql-test/suite/maria/{r => }/maria-partitioning.result (100%) rename mysql-test/suite/maria/{t => }/maria-partitioning.test (100%) rename mysql-test/suite/maria/{r => }/maria-preload.result (100%) rename mysql-test/suite/maria/{t => }/maria-preload.test (100%) rename mysql-test/suite/maria/{r => }/maria-purge.result (100%) rename mysql-test/suite/maria/{t => }/maria-purge.test (100%) rename mysql-test/suite/maria/{t => }/maria-recover-master.opt (100%) rename mysql-test/suite/maria/{r => }/maria-recover.result (100%) rename mysql-test/suite/maria/{t => }/maria-recover.test (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-big-master.opt (100%) rename mysql-test/suite/maria/{r => }/maria-recovery-big.result (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-big.test (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-bitmap-master.opt (100%) rename mysql-test/suite/maria/{r => }/maria-recovery-bitmap.result (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-bitmap.test (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-master.opt (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-rtree-ft-master.opt (100%) rename mysql-test/suite/maria/{r => }/maria-recovery-rtree-ft.result (100%) rename mysql-test/suite/maria/{t => }/maria-recovery-rtree-ft.test (100%) rename mysql-test/suite/maria/{r => }/maria-recovery.result (100%) rename mysql-test/suite/maria/{t => }/maria-recovery.test (100%) rename mysql-test/suite/maria/{t => }/maria-recovery2-master.opt (100%) rename mysql-test/suite/maria/{r => }/maria-recovery2.result (100%) rename mysql-test/suite/maria/{t => }/maria-recovery2.test (100%) rename mysql-test/suite/maria/{t => }/maria-recovery3-master.opt (100%) rename mysql-test/suite/maria/{r => }/maria-recovery3.result (100%) rename mysql-test/suite/maria/{t => }/maria-recovery3.test (100%) rename mysql-test/suite/maria/{r => }/maria-ucs2.result (100%) rename mysql-test/suite/maria/{t => }/maria-ucs2.test (100%) rename mysql-test/suite/maria/{r => }/maria.result (100%) rename mysql-test/suite/maria/{t => }/maria.test (100%) rename mysql-test/suite/maria/{r => }/maria2.result (100%) rename mysql-test/suite/maria/{t => }/maria2.test (100%) rename mysql-test/suite/maria/{r => }/maria3.result (100%) rename mysql-test/suite/maria/{t => }/maria3.test (100%) rename mysql-test/suite/maria/{r => }/maria_notembedded.result (100%) rename mysql-test/suite/maria/{t => }/maria_notembedded.test (100%) rename mysql-test/suite/maria/{r => }/maria_partition.result (100%) rename mysql-test/suite/maria/{t => }/maria_partition.test (100%) rename mysql-test/suite/maria/{r => }/maria_showlog_error.result (100%) rename mysql-test/suite/maria/{t => }/maria_showlog_error.test (100%) rename mysql-test/suite/maria/{r => }/max_length.result (100%) rename mysql-test/suite/maria/{t => }/max_length.test (100%) rename mysql-test/suite/maria/{r => }/optimize.result (100%) rename mysql-test/suite/maria/{t => }/optimize.test (100%) rename mysql-test/suite/maria/{r => }/ps_maria.result (100%) rename mysql-test/suite/maria/{t => }/ps_maria.test (100%) rename mysql-test/suite/maria/{t => }/small_blocksize-master.opt (100%) rename mysql-test/suite/maria/{r => }/small_blocksize.result (100%) rename mysql-test/suite/maria/{t => }/small_blocksize.test (100%) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index fd695d1129f..fdf34c1c9ec 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -163,11 +163,14 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; my $DEFAULT_SUITES= join(',', map { "$_-" } qw( main + archive binlog + csv federated funcs_1 funcs_2 handler + heap innodb maria optimizer_unfixed_bugs diff --git a/mysql-test/r/archive-big.result b/mysql-test/suite/archive/archive-big.result similarity index 100% rename from mysql-test/r/archive-big.result rename to mysql-test/suite/archive/archive-big.result diff --git a/mysql-test/t/archive-big.test b/mysql-test/suite/archive/archive-big.test similarity index 100% rename from mysql-test/t/archive-big.test rename to mysql-test/suite/archive/archive-big.test diff --git a/mysql-test/r/archive.result b/mysql-test/suite/archive/archive.result similarity index 100% rename from mysql-test/r/archive.result rename to mysql-test/suite/archive/archive.result diff --git a/mysql-test/t/archive.test b/mysql-test/suite/archive/archive.test similarity index 100% rename from mysql-test/t/archive.test rename to mysql-test/suite/archive/archive.test diff --git a/mysql-test/r/archive_bitfield.result b/mysql-test/suite/archive/archive_bitfield.result similarity index 100% rename from mysql-test/r/archive_bitfield.result rename to mysql-test/suite/archive/archive_bitfield.result diff --git a/mysql-test/t/archive_bitfield.test b/mysql-test/suite/archive/archive_bitfield.test similarity index 100% rename from mysql-test/t/archive_bitfield.test rename to mysql-test/suite/archive/archive_bitfield.test diff --git a/mysql-test/r/archive_debug.result b/mysql-test/suite/archive/archive_debug.result similarity index 100% rename from mysql-test/r/archive_debug.result rename to mysql-test/suite/archive/archive_debug.result diff --git a/mysql-test/t/archive_debug.test b/mysql-test/suite/archive/archive_debug.test similarity index 100% rename from mysql-test/t/archive_debug.test rename to mysql-test/suite/archive/archive_debug.test diff --git a/mysql-test/r/archive_gis.result b/mysql-test/suite/archive/archive_gis.result similarity index 100% rename from mysql-test/r/archive_gis.result rename to mysql-test/suite/archive/archive_gis.result diff --git a/mysql-test/t/archive_gis.test b/mysql-test/suite/archive/archive_gis.test similarity index 100% rename from mysql-test/t/archive_gis.test rename to mysql-test/suite/archive/archive_gis.test diff --git a/mysql-test/r/archive_plugin.result b/mysql-test/suite/archive/archive_plugin.result similarity index 100% rename from mysql-test/r/archive_plugin.result rename to mysql-test/suite/archive/archive_plugin.result diff --git a/mysql-test/t/archive_plugin.test b/mysql-test/suite/archive/archive_plugin.test similarity index 100% rename from mysql-test/t/archive_plugin.test rename to mysql-test/suite/archive/archive_plugin.test diff --git a/mysql-test/r/mysqlhotcopy_archive.result b/mysql-test/suite/archive/mysqlhotcopy_archive.result similarity index 100% rename from mysql-test/r/mysqlhotcopy_archive.result rename to mysql-test/suite/archive/mysqlhotcopy_archive.result diff --git a/mysql-test/t/mysqlhotcopy_archive.test b/mysql-test/suite/archive/mysqlhotcopy_archive.test similarity index 100% rename from mysql-test/t/mysqlhotcopy_archive.test rename to mysql-test/suite/archive/mysqlhotcopy_archive.test diff --git a/mysql-test/r/partition_archive.result b/mysql-test/suite/archive/partition_archive.result similarity index 100% rename from mysql-test/r/partition_archive.result rename to mysql-test/suite/archive/partition_archive.result diff --git a/mysql-test/t/partition_archive.test b/mysql-test/suite/archive/partition_archive.test similarity index 100% rename from mysql-test/t/partition_archive.test rename to mysql-test/suite/archive/partition_archive.test diff --git a/mysql-test/suite/archive/suite.pm b/mysql-test/suite/archive/suite.pm new file mode 100644 index 00000000000..eb2ff9f8e26 --- /dev/null +++ b/mysql-test/suite/archive/suite.pm @@ -0,0 +1,9 @@ +package My::Suite::Archive; + +@ISA = qw(My::Suite); + +return ("Need Archive engine" unless $ENV{HA_ARCHIVE_SO} or + $::mysqld_variables{'archive'} eq "ON"); + +bless { }; + diff --git a/mysql-test/r/csv.result b/mysql-test/suite/csv/csv.result similarity index 100% rename from mysql-test/r/csv.result rename to mysql-test/suite/csv/csv.result diff --git a/mysql-test/t/csv.test b/mysql-test/suite/csv/csv.test similarity index 100% rename from mysql-test/t/csv.test rename to mysql-test/suite/csv/csv.test diff --git a/mysql-test/r/csv_alter_table.result b/mysql-test/suite/csv/csv_alter_table.result similarity index 100% rename from mysql-test/r/csv_alter_table.result rename to mysql-test/suite/csv/csv_alter_table.result diff --git a/mysql-test/t/csv_alter_table.test b/mysql-test/suite/csv/csv_alter_table.test similarity index 100% rename from mysql-test/t/csv_alter_table.test rename to mysql-test/suite/csv/csv_alter_table.test diff --git a/mysql-test/r/csv_not_null.result b/mysql-test/suite/csv/csv_not_null.result similarity index 100% rename from mysql-test/r/csv_not_null.result rename to mysql-test/suite/csv/csv_not_null.result diff --git a/mysql-test/t/csv_not_null.test b/mysql-test/suite/csv/csv_not_null.test similarity index 100% rename from mysql-test/t/csv_not_null.test rename to mysql-test/suite/csv/csv_not_null.test diff --git a/mysql-test/r/heap.result b/mysql-test/suite/heap/heap.result similarity index 100% rename from mysql-test/r/heap.result rename to mysql-test/suite/heap/heap.result diff --git a/mysql-test/t/heap.test b/mysql-test/suite/heap/heap.test similarity index 100% rename from mysql-test/t/heap.test rename to mysql-test/suite/heap/heap.test diff --git a/mysql-test/r/heap_auto_increment.result b/mysql-test/suite/heap/heap_auto_increment.result similarity index 100% rename from mysql-test/r/heap_auto_increment.result rename to mysql-test/suite/heap/heap_auto_increment.result diff --git a/mysql-test/t/heap_auto_increment.test b/mysql-test/suite/heap/heap_auto_increment.test similarity index 100% rename from mysql-test/t/heap_auto_increment.test rename to mysql-test/suite/heap/heap_auto_increment.test diff --git a/mysql-test/r/heap_btree.result b/mysql-test/suite/heap/heap_btree.result similarity index 100% rename from mysql-test/r/heap_btree.result rename to mysql-test/suite/heap/heap_btree.result diff --git a/mysql-test/t/heap_btree.test b/mysql-test/suite/heap/heap_btree.test similarity index 100% rename from mysql-test/t/heap_btree.test rename to mysql-test/suite/heap/heap_btree.test diff --git a/mysql-test/r/heap_hash.result b/mysql-test/suite/heap/heap_hash.result similarity index 100% rename from mysql-test/r/heap_hash.result rename to mysql-test/suite/heap/heap_hash.result diff --git a/mysql-test/t/heap_hash.test b/mysql-test/suite/heap/heap_hash.test similarity index 100% rename from mysql-test/t/heap_hash.test rename to mysql-test/suite/heap/heap_hash.test diff --git a/mysql-test/suite/maria/t/compat_aliases-master.opt b/mysql-test/suite/maria/compat_aliases-master.opt similarity index 100% rename from mysql-test/suite/maria/t/compat_aliases-master.opt rename to mysql-test/suite/maria/compat_aliases-master.opt diff --git a/mysql-test/suite/maria/r/group_commit.result b/mysql-test/suite/maria/group_commit.result similarity index 100% rename from mysql-test/suite/maria/r/group_commit.result rename to mysql-test/suite/maria/group_commit.result diff --git a/mysql-test/suite/maria/t/group_commit.test b/mysql-test/suite/maria/group_commit.test similarity index 100% rename from mysql-test/suite/maria/t/group_commit.test rename to mysql-test/suite/maria/group_commit.test diff --git a/mysql-test/suite/maria/r/locking.result b/mysql-test/suite/maria/locking.result similarity index 100% rename from mysql-test/suite/maria/r/locking.result rename to mysql-test/suite/maria/locking.result diff --git a/mysql-test/suite/maria/t/locking.test b/mysql-test/suite/maria/locking.test similarity index 100% rename from mysql-test/suite/maria/t/locking.test rename to mysql-test/suite/maria/locking.test diff --git a/mysql-test/suite/maria/r/maria-autozerofill.result b/mysql-test/suite/maria/maria-autozerofill.result similarity index 100% rename from mysql-test/suite/maria/r/maria-autozerofill.result rename to mysql-test/suite/maria/maria-autozerofill.result diff --git a/mysql-test/suite/maria/t/maria-autozerofill.test b/mysql-test/suite/maria/maria-autozerofill.test similarity index 100% rename from mysql-test/suite/maria/t/maria-autozerofill.test rename to mysql-test/suite/maria/maria-autozerofill.test diff --git a/mysql-test/suite/maria/r/maria-big.result b/mysql-test/suite/maria/maria-big.result similarity index 100% rename from mysql-test/suite/maria/r/maria-big.result rename to mysql-test/suite/maria/maria-big.result diff --git a/mysql-test/suite/maria/t/maria-big.test b/mysql-test/suite/maria/maria-big.test similarity index 100% rename from mysql-test/suite/maria/t/maria-big.test rename to mysql-test/suite/maria/maria-big.test diff --git a/mysql-test/suite/maria/r/maria-big2.result b/mysql-test/suite/maria/maria-big2.result similarity index 100% rename from mysql-test/suite/maria/r/maria-big2.result rename to mysql-test/suite/maria/maria-big2.result diff --git a/mysql-test/suite/maria/t/maria-big2.test b/mysql-test/suite/maria/maria-big2.test similarity index 100% rename from mysql-test/suite/maria/t/maria-big2.test rename to mysql-test/suite/maria/maria-big2.test diff --git a/mysql-test/suite/maria/r/maria-connect.result b/mysql-test/suite/maria/maria-connect.result similarity index 100% rename from mysql-test/suite/maria/r/maria-connect.result rename to mysql-test/suite/maria/maria-connect.result diff --git a/mysql-test/suite/maria/t/maria-connect.test b/mysql-test/suite/maria/maria-connect.test similarity index 100% rename from mysql-test/suite/maria/t/maria-connect.test rename to mysql-test/suite/maria/maria-connect.test diff --git a/mysql-test/suite/maria/t/maria-gis-recovery.opt b/mysql-test/suite/maria/maria-gis-recovery.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-gis-recovery.opt rename to mysql-test/suite/maria/maria-gis-recovery.opt diff --git a/mysql-test/suite/maria/r/maria-gis-recovery.result b/mysql-test/suite/maria/maria-gis-recovery.result similarity index 100% rename from mysql-test/suite/maria/r/maria-gis-recovery.result rename to mysql-test/suite/maria/maria-gis-recovery.result diff --git a/mysql-test/suite/maria/t/maria-gis-recovery.test b/mysql-test/suite/maria/maria-gis-recovery.test similarity index 100% rename from mysql-test/suite/maria/t/maria-gis-recovery.test rename to mysql-test/suite/maria/maria-gis-recovery.test diff --git a/mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result similarity index 100% rename from mysql-test/suite/maria/r/maria-gis-rtree-dynamic.result rename to mysql-test/suite/maria/maria-gis-rtree-dynamic.result diff --git a/mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test similarity index 100% rename from mysql-test/suite/maria/t/maria-gis-rtree-dynamic.test rename to mysql-test/suite/maria/maria-gis-rtree-dynamic.test diff --git a/mysql-test/suite/maria/r/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result similarity index 100% rename from mysql-test/suite/maria/r/maria-gis-rtree-trans.result rename to mysql-test/suite/maria/maria-gis-rtree-trans.result diff --git a/mysql-test/suite/maria/t/maria-gis-rtree-trans.test b/mysql-test/suite/maria/maria-gis-rtree-trans.test similarity index 100% rename from mysql-test/suite/maria/t/maria-gis-rtree-trans.test rename to mysql-test/suite/maria/maria-gis-rtree-trans.test diff --git a/mysql-test/suite/maria/r/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result similarity index 100% rename from mysql-test/suite/maria/r/maria-gis-rtree.result rename to mysql-test/suite/maria/maria-gis-rtree.result diff --git a/mysql-test/suite/maria/t/maria-gis-rtree.test b/mysql-test/suite/maria/maria-gis-rtree.test similarity index 100% rename from mysql-test/suite/maria/t/maria-gis-rtree.test rename to mysql-test/suite/maria/maria-gis-rtree.test diff --git a/mysql-test/suite/maria/r/maria-mvcc.result b/mysql-test/suite/maria/maria-mvcc.result similarity index 100% rename from mysql-test/suite/maria/r/maria-mvcc.result rename to mysql-test/suite/maria/maria-mvcc.result diff --git a/mysql-test/suite/maria/t/maria-mvcc.test b/mysql-test/suite/maria/maria-mvcc.test similarity index 100% rename from mysql-test/suite/maria/t/maria-mvcc.test rename to mysql-test/suite/maria/maria-mvcc.test diff --git a/mysql-test/suite/maria/r/maria-no-logging.result b/mysql-test/suite/maria/maria-no-logging.result similarity index 100% rename from mysql-test/suite/maria/r/maria-no-logging.result rename to mysql-test/suite/maria/maria-no-logging.result diff --git a/mysql-test/suite/maria/t/maria-no-logging.test b/mysql-test/suite/maria/maria-no-logging.test similarity index 100% rename from mysql-test/suite/maria/t/maria-no-logging.test rename to mysql-test/suite/maria/maria-no-logging.test diff --git a/mysql-test/suite/maria/r/maria-page-checksum.result b/mysql-test/suite/maria/maria-page-checksum.result similarity index 100% rename from mysql-test/suite/maria/r/maria-page-checksum.result rename to mysql-test/suite/maria/maria-page-checksum.result diff --git a/mysql-test/suite/maria/t/maria-page-checksum.test b/mysql-test/suite/maria/maria-page-checksum.test similarity index 100% rename from mysql-test/suite/maria/t/maria-page-checksum.test rename to mysql-test/suite/maria/maria-page-checksum.test diff --git a/mysql-test/suite/maria/r/maria-partitioning.result b/mysql-test/suite/maria/maria-partitioning.result similarity index 100% rename from mysql-test/suite/maria/r/maria-partitioning.result rename to mysql-test/suite/maria/maria-partitioning.result diff --git a/mysql-test/suite/maria/t/maria-partitioning.test b/mysql-test/suite/maria/maria-partitioning.test similarity index 100% rename from mysql-test/suite/maria/t/maria-partitioning.test rename to mysql-test/suite/maria/maria-partitioning.test diff --git a/mysql-test/suite/maria/r/maria-preload.result b/mysql-test/suite/maria/maria-preload.result similarity index 100% rename from mysql-test/suite/maria/r/maria-preload.result rename to mysql-test/suite/maria/maria-preload.result diff --git a/mysql-test/suite/maria/t/maria-preload.test b/mysql-test/suite/maria/maria-preload.test similarity index 100% rename from mysql-test/suite/maria/t/maria-preload.test rename to mysql-test/suite/maria/maria-preload.test diff --git a/mysql-test/suite/maria/r/maria-purge.result b/mysql-test/suite/maria/maria-purge.result similarity index 100% rename from mysql-test/suite/maria/r/maria-purge.result rename to mysql-test/suite/maria/maria-purge.result diff --git a/mysql-test/suite/maria/t/maria-purge.test b/mysql-test/suite/maria/maria-purge.test similarity index 100% rename from mysql-test/suite/maria/t/maria-purge.test rename to mysql-test/suite/maria/maria-purge.test diff --git a/mysql-test/suite/maria/t/maria-recover-master.opt b/mysql-test/suite/maria/maria-recover-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recover-master.opt rename to mysql-test/suite/maria/maria-recover-master.opt diff --git a/mysql-test/suite/maria/r/maria-recover.result b/mysql-test/suite/maria/maria-recover.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recover.result rename to mysql-test/suite/maria/maria-recover.result diff --git a/mysql-test/suite/maria/t/maria-recover.test b/mysql-test/suite/maria/maria-recover.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recover.test rename to mysql-test/suite/maria/maria-recover.test diff --git a/mysql-test/suite/maria/t/maria-recovery-big-master.opt b/mysql-test/suite/maria/maria-recovery-big-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-big-master.opt rename to mysql-test/suite/maria/maria-recovery-big-master.opt diff --git a/mysql-test/suite/maria/r/maria-recovery-big.result b/mysql-test/suite/maria/maria-recovery-big.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recovery-big.result rename to mysql-test/suite/maria/maria-recovery-big.result diff --git a/mysql-test/suite/maria/t/maria-recovery-big.test b/mysql-test/suite/maria/maria-recovery-big.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-big.test rename to mysql-test/suite/maria/maria-recovery-big.test diff --git a/mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt b/mysql-test/suite/maria/maria-recovery-bitmap-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-bitmap-master.opt rename to mysql-test/suite/maria/maria-recovery-bitmap-master.opt diff --git a/mysql-test/suite/maria/r/maria-recovery-bitmap.result b/mysql-test/suite/maria/maria-recovery-bitmap.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recovery-bitmap.result rename to mysql-test/suite/maria/maria-recovery-bitmap.result diff --git a/mysql-test/suite/maria/t/maria-recovery-bitmap.test b/mysql-test/suite/maria/maria-recovery-bitmap.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-bitmap.test rename to mysql-test/suite/maria/maria-recovery-bitmap.test diff --git a/mysql-test/suite/maria/t/maria-recovery-master.opt b/mysql-test/suite/maria/maria-recovery-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-master.opt rename to mysql-test/suite/maria/maria-recovery-master.opt diff --git a/mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt b/mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-rtree-ft-master.opt rename to mysql-test/suite/maria/maria-recovery-rtree-ft-master.opt diff --git a/mysql-test/suite/maria/r/maria-recovery-rtree-ft.result b/mysql-test/suite/maria/maria-recovery-rtree-ft.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recovery-rtree-ft.result rename to mysql-test/suite/maria/maria-recovery-rtree-ft.result diff --git a/mysql-test/suite/maria/t/maria-recovery-rtree-ft.test b/mysql-test/suite/maria/maria-recovery-rtree-ft.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery-rtree-ft.test rename to mysql-test/suite/maria/maria-recovery-rtree-ft.test diff --git a/mysql-test/suite/maria/r/maria-recovery.result b/mysql-test/suite/maria/maria-recovery.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recovery.result rename to mysql-test/suite/maria/maria-recovery.result diff --git a/mysql-test/suite/maria/t/maria-recovery.test b/mysql-test/suite/maria/maria-recovery.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery.test rename to mysql-test/suite/maria/maria-recovery.test diff --git a/mysql-test/suite/maria/t/maria-recovery2-master.opt b/mysql-test/suite/maria/maria-recovery2-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery2-master.opt rename to mysql-test/suite/maria/maria-recovery2-master.opt diff --git a/mysql-test/suite/maria/r/maria-recovery2.result b/mysql-test/suite/maria/maria-recovery2.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recovery2.result rename to mysql-test/suite/maria/maria-recovery2.result diff --git a/mysql-test/suite/maria/t/maria-recovery2.test b/mysql-test/suite/maria/maria-recovery2.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery2.test rename to mysql-test/suite/maria/maria-recovery2.test diff --git a/mysql-test/suite/maria/t/maria-recovery3-master.opt b/mysql-test/suite/maria/maria-recovery3-master.opt similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery3-master.opt rename to mysql-test/suite/maria/maria-recovery3-master.opt diff --git a/mysql-test/suite/maria/r/maria-recovery3.result b/mysql-test/suite/maria/maria-recovery3.result similarity index 100% rename from mysql-test/suite/maria/r/maria-recovery3.result rename to mysql-test/suite/maria/maria-recovery3.result diff --git a/mysql-test/suite/maria/t/maria-recovery3.test b/mysql-test/suite/maria/maria-recovery3.test similarity index 100% rename from mysql-test/suite/maria/t/maria-recovery3.test rename to mysql-test/suite/maria/maria-recovery3.test diff --git a/mysql-test/suite/maria/r/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result similarity index 100% rename from mysql-test/suite/maria/r/maria-ucs2.result rename to mysql-test/suite/maria/maria-ucs2.result diff --git a/mysql-test/suite/maria/t/maria-ucs2.test b/mysql-test/suite/maria/maria-ucs2.test similarity index 100% rename from mysql-test/suite/maria/t/maria-ucs2.test rename to mysql-test/suite/maria/maria-ucs2.test diff --git a/mysql-test/suite/maria/r/maria.result b/mysql-test/suite/maria/maria.result similarity index 100% rename from mysql-test/suite/maria/r/maria.result rename to mysql-test/suite/maria/maria.result diff --git a/mysql-test/suite/maria/t/maria.test b/mysql-test/suite/maria/maria.test similarity index 100% rename from mysql-test/suite/maria/t/maria.test rename to mysql-test/suite/maria/maria.test diff --git a/mysql-test/suite/maria/r/maria2.result b/mysql-test/suite/maria/maria2.result similarity index 100% rename from mysql-test/suite/maria/r/maria2.result rename to mysql-test/suite/maria/maria2.result diff --git a/mysql-test/suite/maria/t/maria2.test b/mysql-test/suite/maria/maria2.test similarity index 100% rename from mysql-test/suite/maria/t/maria2.test rename to mysql-test/suite/maria/maria2.test diff --git a/mysql-test/suite/maria/r/maria3.result b/mysql-test/suite/maria/maria3.result similarity index 100% rename from mysql-test/suite/maria/r/maria3.result rename to mysql-test/suite/maria/maria3.result diff --git a/mysql-test/suite/maria/t/maria3.test b/mysql-test/suite/maria/maria3.test similarity index 100% rename from mysql-test/suite/maria/t/maria3.test rename to mysql-test/suite/maria/maria3.test diff --git a/mysql-test/suite/maria/r/maria_notembedded.result b/mysql-test/suite/maria/maria_notembedded.result similarity index 100% rename from mysql-test/suite/maria/r/maria_notembedded.result rename to mysql-test/suite/maria/maria_notembedded.result diff --git a/mysql-test/suite/maria/t/maria_notembedded.test b/mysql-test/suite/maria/maria_notembedded.test similarity index 100% rename from mysql-test/suite/maria/t/maria_notembedded.test rename to mysql-test/suite/maria/maria_notembedded.test diff --git a/mysql-test/suite/maria/r/maria_partition.result b/mysql-test/suite/maria/maria_partition.result similarity index 100% rename from mysql-test/suite/maria/r/maria_partition.result rename to mysql-test/suite/maria/maria_partition.result diff --git a/mysql-test/suite/maria/t/maria_partition.test b/mysql-test/suite/maria/maria_partition.test similarity index 100% rename from mysql-test/suite/maria/t/maria_partition.test rename to mysql-test/suite/maria/maria_partition.test diff --git a/mysql-test/suite/maria/r/maria_showlog_error.result b/mysql-test/suite/maria/maria_showlog_error.result similarity index 100% rename from mysql-test/suite/maria/r/maria_showlog_error.result rename to mysql-test/suite/maria/maria_showlog_error.result diff --git a/mysql-test/suite/maria/t/maria_showlog_error.test b/mysql-test/suite/maria/maria_showlog_error.test similarity index 100% rename from mysql-test/suite/maria/t/maria_showlog_error.test rename to mysql-test/suite/maria/maria_showlog_error.test diff --git a/mysql-test/suite/maria/r/max_length.result b/mysql-test/suite/maria/max_length.result similarity index 100% rename from mysql-test/suite/maria/r/max_length.result rename to mysql-test/suite/maria/max_length.result diff --git a/mysql-test/suite/maria/t/max_length.test b/mysql-test/suite/maria/max_length.test similarity index 100% rename from mysql-test/suite/maria/t/max_length.test rename to mysql-test/suite/maria/max_length.test diff --git a/mysql-test/suite/maria/r/optimize.result b/mysql-test/suite/maria/optimize.result similarity index 100% rename from mysql-test/suite/maria/r/optimize.result rename to mysql-test/suite/maria/optimize.result diff --git a/mysql-test/suite/maria/t/optimize.test b/mysql-test/suite/maria/optimize.test similarity index 100% rename from mysql-test/suite/maria/t/optimize.test rename to mysql-test/suite/maria/optimize.test diff --git a/mysql-test/suite/maria/r/ps_maria.result b/mysql-test/suite/maria/ps_maria.result similarity index 100% rename from mysql-test/suite/maria/r/ps_maria.result rename to mysql-test/suite/maria/ps_maria.result diff --git a/mysql-test/suite/maria/t/ps_maria.test b/mysql-test/suite/maria/ps_maria.test similarity index 100% rename from mysql-test/suite/maria/t/ps_maria.test rename to mysql-test/suite/maria/ps_maria.test diff --git a/mysql-test/suite/maria/t/small_blocksize-master.opt b/mysql-test/suite/maria/small_blocksize-master.opt similarity index 100% rename from mysql-test/suite/maria/t/small_blocksize-master.opt rename to mysql-test/suite/maria/small_blocksize-master.opt diff --git a/mysql-test/suite/maria/r/small_blocksize.result b/mysql-test/suite/maria/small_blocksize.result similarity index 100% rename from mysql-test/suite/maria/r/small_blocksize.result rename to mysql-test/suite/maria/small_blocksize.result diff --git a/mysql-test/suite/maria/t/small_blocksize.test b/mysql-test/suite/maria/small_blocksize.test similarity index 100% rename from mysql-test/suite/maria/t/small_blocksize.test rename to mysql-test/suite/maria/small_blocksize.test From f081107fe01a1d9a6d7d88e3d9c7c5e99aec8144 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 7 Apr 2012 17:27:00 -0700 Subject: [PATCH 02/62] Fixed LP bug #972943 properly. The previous patch for the bug (that erroneously identified the bug as bug 972973 in its comment) was incorrect. It turned out that the code that triggered the abort complain reported for the bug was not needed at all. --- sql/item_subselect.cc | 3 --- sql/sql_select.cc | 1 - 2 files changed, 4 deletions(-) diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index a1059f68097..8b720b350a5 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2726,9 +2726,6 @@ bool subselect_union_engine::no_rows() void subselect_uniquesubquery_engine::cleanup() { DBUG_ENTER("subselect_uniquesubquery_engine::cleanup"); - /* Tell handler we don't need the index anymore */ - if (tab->table->file && tab->table->file->inited) - tab->table->file->ha_index_end(); DBUG_VOID_RETURN; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1049fc93d01..a29b6f90be0 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -15116,7 +15116,6 @@ free_tmp_table(THD *thd, TABLE *entry) else entry->file->ha_delete_table(entry->s->table_name.str); delete entry->file; - entry->file= 0; } /* free blobs */ From 24516289237d5677f0624b1f37306ec505a6db8b Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 13 Apr 2012 19:44:22 +0200 Subject: [PATCH 03/62] Fixed some simple warnings on Windows. --- dbug/tests.c | 5 +++-- extra/my_print_defaults.c | 6 +++--- sql-common/client.c | 13 ------------- sql/item_func.h | 2 +- sql/mysqld.cc | 2 +- sql/signal_handler.cc | 2 +- sql/slave.cc | 4 ++-- sql/sql_test.cc | 2 +- storage/innobase/CMakeLists.txt | 9 +++++++++ storage/maria/unittest/ma_control_file-t.c | 4 +++- .../unittest/ma_test_loghandler_multithread-t.c | 2 +- storage/perfschema/pfs_instr_class.cc | 8 ++------ storage/perfschema/pfs_instr_class.h | 4 +++- storage/sphinx/ha_sphinx.cc | 1 - 14 files changed, 30 insertions(+), 34 deletions(-) diff --git a/dbug/tests.c b/dbug/tests.c index 5950c5fa583..657ed638a5a 100644 --- a/dbug/tests.c +++ b/dbug/tests.c @@ -38,10 +38,10 @@ int func1() int main (int argc, char *argv[]) { - int i; #ifdef DBUG_OFF return 1; -#endif +#else + int i; if (argc == 1) return 0; @@ -83,4 +83,5 @@ int main (int argc, char *argv[]) DBUG_SET(""); /* to not have my_end() in the traces */ my_end(0); return 0; +#endif /* DBUG_OFF */ } diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index a25381c4808..8a16e677cb9 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -67,7 +67,7 @@ static struct my_option my_long_options[] = {"defaults-extra-file", 'e', "Read this file after the global config file and before the config " "file in the users home directory; should be the first option", - &my_defaults_extra_file, &my_defaults_extra_file, 0, + (void *)&my_defaults_extra_file, (void *)&my_defaults_extra_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"defaults-group-suffix", 'g', "In addition to the given groups, read also groups with this suffix", @@ -75,8 +75,8 @@ static struct my_option my_long_options[] = 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"extra-file", 'e', "Deprecated. Synonym for --defaults-extra-file.", - &my_defaults_extra_file, - &my_defaults_extra_file, 0, GET_STR, + (void *)&my_defaults_extra_file, + (void *)&my_defaults_extra_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"no-defaults", 'n', "Return an empty string (useful for scripts).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/sql-common/client.c b/sql-common/client.c index f6084d061b8..349d844ebd3 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2969,10 +2969,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, const char *scramble_plugin; ulong pkt_length; NET *net= &mysql->net; -#ifdef MYSQL_SERVER - thr_alarm_t alarmed; - ALARM alarm_buff; -#endif #ifdef __WIN__ HANDLE hPipe=INVALID_HANDLE_VALUE; #endif @@ -3181,17 +3177,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, my_snprintf(host_info=buff, sizeof(buff)-1, ER(CR_TCP_CONNECTION), host); DBUG_PRINT("info",("Server name: '%s'. TCP sock: %d", host, port)); -#ifdef MYSQL_SERVER - thr_alarm_init(&alarmed); - thr_alarm(&alarmed, mysql->options.connect_timeout, &alarm_buff); -#endif - DBUG_PRINT("info",("IP '%s'", "client")); -#ifdef MYSQL_SERVER - thr_end_alarm(&alarmed); -#endif - memset(&hints, 0, sizeof(hints)); hints.ai_socktype= SOCK_STREAM; hints.ai_protocol= IPPROTO_TCP; diff --git a/sql/item_func.h b/sql/item_func.h index f5c43360ee8..3b1a38cf447 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -150,7 +150,7 @@ public: void count_only_length(); void count_real_length(); void count_decimal_length(); - inline bool get_arg0_date(MYSQL_TIME *ltime, uint fuzzy_date) + inline bool get_arg0_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) { return (null_value=args[0]->get_date(ltime, fuzzy_date)); } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d6db9a4e230..5828cfbe873 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2220,8 +2220,8 @@ static void network_init(void) { #ifdef HAVE_SYS_UN_H struct sockaddr_un UNIXaddr; -#endif int arg; +#endif DBUG_ENTER("network_init"); if (MYSQL_CALLBACK_ELSE(thread_scheduler, init, (), 0)) diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc index 3e194805dbc..37f28844a7c 100644 --- a/sql/signal_handler.cc +++ b/sql/signal_handler.cc @@ -167,7 +167,7 @@ extern "C" sig_handler handle_fatal_signal(int sig) "where mysqld died. If you see no messages after this, something went\n" "terribly wrong...\n"); my_print_stacktrace(thd ? (uchar*) thd->thread_stack : NULL, - my_thread_stack_size); + (ulong)my_thread_stack_size); } if (thd) { diff --git a/sql/slave.cc b/sql/slave.cc index 9f593b3075e..941a275cd84 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4155,8 +4155,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len) { int error= 0; String error_msg; - ulong inc_pos; - ulong event_pos; + ulonglong inc_pos; + ulonglong event_pos; Relay_log_info *rli= &mi->rli; mysql_mutex_t *log_lock= rli->relay_log.get_log_lock(); ulong s_id; diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 46f27f184fa..25ab84fe4db 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -618,8 +618,8 @@ Open streams: %10lu\n", (ulong) my_file_opened, (ulong) my_stream_opened); - ALARM_INFO alarm_info; #ifndef DONT_USE_THR_ALARM + ALARM_INFO alarm_info; thr_alarm_info(&alarm_info); printf("\nAlarm status:\n\ Active alarms: %u\n\ diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 04b5fd8d19d..e4455630bc8 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -214,6 +214,15 @@ IF (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) PROPERTIES COMPILE_FLAGS -Od) ENDIF() +IF(MSVC) + # Avoid "unreferenced label" warning in generated file + GET_FILENAME_COMPONENT(_SRC_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + SET_SOURCE_FILES_PROPERTIES(${_SRC_DIR}/pars/pars0grm.c + PROPERTIES COMPILE_FLAGS "/wd4102") + SET_SOURCE_FILES_PROPERTIES(${_SRC_DIR}/pars/lexyy.c + PROPERTIES COMPILE_FLAGS "/wd4003") +ENDIF() + SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c data/data0data.c data/data0type.c diff --git a/storage/maria/unittest/ma_control_file-t.c b/storage/maria/unittest/ma_control_file-t.c index 8533e461361..b4e757788c2 100644 --- a/storage/maria/unittest/ma_control_file-t.c +++ b/storage/maria/unittest/ma_control_file-t.c @@ -23,7 +23,9 @@ #include #include #include - +#ifdef _WIN32 +#include /* rmdir */ +#endif #ifndef WITH_ARIA_STORAGE_ENGINE /* If Aria is not compiled in, normally we don't come to building this test. diff --git a/storage/maria/unittest/ma_test_loghandler_multithread-t.c b/storage/maria/unittest/ma_test_loghandler_multithread-t.c index 5933059263a..18fbaeace5a 100644 --- a/storage/maria/unittest/ma_test_loghandler_multithread-t.c +++ b/storage/maria/unittest/ma_test_loghandler_multithread-t.c @@ -289,7 +289,7 @@ int main(int argc __attribute__((unused)), fprintf(stderr, "End of memory\n"); exit(1); } - for (i= 0; i < (LONG_BUFFER_SIZE + 7 * 2 + 2); i++) + for (i= 0; i < (uint32)(LONG_BUFFER_SIZE + 7 * 2 + 2); i++) long_buffer[i]= (i & 0xFF); #ifndef DBUG_OFF diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc index d99ca4d513c..8bad6e99b3a 100644 --- a/storage/perfschema/pfs_instr_class.cc +++ b/storage/perfschema/pfs_instr_class.cc @@ -823,16 +823,14 @@ const char *sanitize_table_schema_name(const char *unsafe) intptr first= (intptr) &table_share_array[0]; intptr last= (intptr) &table_share_array[table_share_max]; - PFS_table_share dummy; /* Check if unsafe points inside table_share_array[] */ if (likely((first <= ptr) && (ptr < last))) { intptr offset= (ptr - first) % sizeof(PFS_table_share); intptr from= my_offsetof(PFS_table_share, m_key.m_hash_key); - intptr len= sizeof(dummy.m_key.m_hash_key); /* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */ - if (likely((from <= offset) && (offset < from + len))) + if (likely((from <= offset) && (offset < from + PFS_TABLESHARE_HASHKEY_SIZE))) { PFS_table_share *base= (PFS_table_share*) (ptr - offset); /* Check if unsafe really is the schema name */ @@ -849,16 +847,14 @@ const char *sanitize_table_object_name(const char *unsafe) intptr first= (intptr) &table_share_array[0]; intptr last= (intptr) &table_share_array[table_share_max]; - PFS_table_share dummy; /* Check if unsafe points inside table_share_array[] */ if (likely((first <= ptr) && (ptr < last))) { intptr offset= (ptr - first) % sizeof(PFS_table_share); intptr from= my_offsetof(PFS_table_share, m_key.m_hash_key); - intptr len= sizeof(dummy.m_key.m_hash_key); /* Check if unsafe points inside PFS_table_share::m_key::m_hash_key */ - if (likely((from <= offset) && (offset < from + len))) + if (likely((from <= offset) && (offset < from + PFS_TABLESHARE_HASHKEY_SIZE))) { PFS_table_share *base= (PFS_table_share*) (ptr - offset); /* Check if unsafe really is the table name */ diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h index 107db628226..b84691ccde5 100644 --- a/storage/perfschema/pfs_instr_class.h +++ b/storage/perfschema/pfs_instr_class.h @@ -128,6 +128,8 @@ struct PFS_thread_class bool m_enabled; }; +#define PFS_TABLESHARE_HASHKEY_SIZE (NAME_LEN + 1 + NAME_LEN + 1) + /** Key identifying a table share. */ struct PFS_table_share_key { @@ -137,7 +139,7 @@ struct PFS_table_share_key the format is "<0x00><0x00>" @see create_table_def_key */ - char m_hash_key[NAME_LEN + 1 + NAME_LEN + 1]; + char m_hash_key[PFS_TABLESHARE_HASHKEY_SIZE]; /** Length in bytes of @c m_hash_key. */ uint m_key_length; }; diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc index 4d6b729196c..27a463bf61f 100644 --- a/storage/sphinx/ha_sphinx.cc +++ b/storage/sphinx/ha_sphinx.cc @@ -50,7 +50,6 @@ #else // Windows-specific #include - #define strcasecmp stricmp #define snprintf _snprintf #define RECV_FLAGS 0 From 742ccf7a47b8cfc2d0c831aec630b273dd56507a Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 15 Apr 2012 01:19:39 +0200 Subject: [PATCH 04/62] MDEV-221 : Fix potential memory access past the end of input string in filename_to_tablename() --- sql/sql_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 75f430b451e..4366a722272 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -379,7 +379,7 @@ uint filename_to_tablename(const char *from, char *to, uint to_length DBUG_ENTER("filename_to_tablename"); DBUG_PRINT("enter", ("from '%s'", from)); - if (!memcmp(from, tmp_file_prefix, tmp_file_prefix_length)) + if (!strncmp(from, tmp_file_prefix, tmp_file_prefix_length)) { /* Temporary table name. */ res= (strnmov(to, from, to_length) - to); From f18514df2ea2a04c3c03625531935f7703fc98f3 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 15 Apr 2012 01:21:18 +0200 Subject: [PATCH 05/62] Add minimal clarication about 'root' user to the installer UI --- win/packaging/extra.wxs.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in index 37b12575328..e4f459d3dfe 100644 --- a/win/packaging/extra.wxs.in +++ b/win/packaging/extra.wxs.in @@ -233,7 +233,7 @@ - {\Font1}Modify root password + {\Font1}Modify password for database user 'root' NOT ModifyRootPassword NOT ModifyRootPassword NOT ModifyRootPassword @@ -255,7 +255,7 @@ - {\Font1}Enable root access from remote machines + {\Font1}Enable access from remote machines for 'root' user ModifyRootPassword NOT ModifyRootPassword From 87b6f241064beb8f94669ba438e8c9c479016e76 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 15 Apr 2012 01:29:17 +0200 Subject: [PATCH 06/62] Use test/db.opt as dummy file in the package, instead of test/.empty Also, do not package aria log files in the zip package- not required for the database to function, also will avoid trouble with recovery, if someone accidentially (or on purpose) upgrades by unpacking the zip in the existing install directory. --- sql/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 446db5d128a..0e64487e24f 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -271,7 +271,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE") # We need to create empty directories (data/test) the installation. # This does not work with current CPack due to http://www.cmake.org/Bug/view.php?id=8767 # Avoid completely empty directories and install dummy file instead. -SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty ) +SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/db.opt ) FILE(WRITE ${DUMMY_FILE} "") INSTALL(FILES ${DUMMY_FILE} DESTINATION data/test COMPONENT DataFiles) @@ -303,7 +303,11 @@ IF(WIN32 AND MYSQLD_EXECUTABLE) DEPENDS initdb.dep ) INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data DESTINATION . - COMPONENT DataFiles PATTERN "initdb.dep" EXCLUDE PATTERN "bootstrap.sql" EXCLUDE) + COMPONENT DataFiles + PATTERN "initdb.dep" EXCLUDE + PATTERN "bootstrap.sql" EXCLUDE + PATTERN "aria*" EXCLUDE + ) ELSE() # Not windows or cross compiling, just install an empty directory INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql COMPONENT DataFiles) From 8bf7aae23e4448df3ec2a86f04d0a166fafdd1e6 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 15 Apr 2012 01:40:00 +0200 Subject: [PATCH 07/62] fix application verifier crashes --- mysys/my_init.c | 5 ++++- mysys/my_thr_init.c | 1 - mysys/waiting_threads.c | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mysys/my_init.c b/mysys/my_init.c index c16602318ca..14f831f72b2 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -29,6 +29,7 @@ #pragma comment(lib, "ws2_32") #endif my_bool have_tcpip=0; +extern pthread_key(struct st_my_thread_var*, THR_KEY_mysys); static void my_win_init(void); static my_bool win32_init_tcp_ip(); #else @@ -221,7 +222,9 @@ Voluntary context switches %ld, Involuntary context switches %ld\n", if (have_tcpip) WSACleanup(); #endif /* __WIN__ */ - + + /* At very last, delete mysys key, it is used everywhere including DBUG */ + pthread_key_delete(THR_KEY_mysys); my_init_done=0; } /* my_end */ diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 03041342787..ac16189f3a7 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -274,7 +274,6 @@ void my_thread_global_end(void) */ if (all_threads_killed) { - pthread_key_delete(THR_KEY_mysys); my_thread_destroy_internal_mutex(); } my_thread_global_init_done= 0; diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c index ddc06a3ae5e..f7e74e012d2 100644 --- a/mysys/waiting_threads.c +++ b/mysys/waiting_threads.c @@ -423,6 +423,8 @@ static void wt_resource_destroy(uchar *arg) DBUG_VOID_RETURN; } +static int wt_init_done; + void wt_init() { DBUG_ENTER("wt_init"); @@ -456,18 +458,22 @@ void wt_init() my_atomic_rwlock_init(&cycle_stats_lock); my_atomic_rwlock_init(&success_stats_lock); my_atomic_rwlock_init(&wait_stats_lock); + wt_init_done= 1; DBUG_VOID_RETURN; } void wt_end() { DBUG_ENTER("wt_end"); + if (!wt_init_done) + DBUG_VOID_RETURN; DBUG_ASSERT(reshash.count == 0); lf_hash_destroy(&reshash); my_atomic_rwlock_destroy(&cycle_stats_lock); my_atomic_rwlock_destroy(&success_stats_lock); my_atomic_rwlock_destroy(&wait_stats_lock); + wt_init_done= 0; DBUG_VOID_RETURN; } From 0a2afb7259e1cac86248f293176afc449ad265e4 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 15 Apr 2012 01:41:03 +0200 Subject: [PATCH 08/62] exclude cmake generated files from mysql-test installation (applies only for in-source builds) --- mysql-test/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index f360ef1c616..d065e8935c2 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -28,6 +28,10 @@ INSTALL( PATTERN ".cvsignore" EXCLUDE PATTERN "*.am" EXCLUDE PATTERN "*.in" EXCLUDE + PATTERN "*.vcxproj" EXCLUDE + PATTERN "*.vcxproj.filters" EXCLUDE + PATTERN "*.vcxproj.user" EXCLUDE + PATTERN "CTest" EXCLUDE ) ENDIF() From 296167d6d222a84ef5c019f7572378075b0d7c7c Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 15 Apr 2012 01:54:28 +0200 Subject: [PATCH 09/62] fix compile error on unixes --- mysys/my_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mysys/my_init.c b/mysys/my_init.c index 14f831f72b2..193c8281577 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -29,13 +29,14 @@ #pragma comment(lib, "ws2_32") #endif my_bool have_tcpip=0; -extern pthread_key(struct st_my_thread_var*, THR_KEY_mysys); static void my_win_init(void); static my_bool win32_init_tcp_ip(); #else #define my_win_init() #endif +extern pthread_key(struct st_my_thread_var*, THR_KEY_mysys); + #define SCALE_SEC 100 #define SCALE_USEC 10000 From 4da30b3e3db552894825c5ec94cbdb110d13fbf0 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 16 Apr 2012 15:28:33 +0200 Subject: [PATCH 10/62] MDEV-221 - Properly escape command line when starting mysql_install_db since password characters can contain quotes or spaces. The proper quoting method for command line arguments used here was extracted from http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx Additionally, mysql_install_db.exe now passes root password to "mysqld.exe --bootstrap" in hexadecimal form, to handle potential special chars inside password string literal. --- sql/mysql_install_db.cc | 18 +++++-- win/packaging/ca/CustomAction.cpp | 86 ++++++++++++++++++++++++++++++- win/packaging/extra.wxs.in | 5 +- 3 files changed, 101 insertions(+), 8 deletions(-) diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index 086dc292dec..364dca9120a 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -316,9 +316,9 @@ static int create_myini() static const char update_root_passwd_part1[]= - "UPDATE mysql.user SET Password = PASSWORD('"; + "UPDATE mysql.user SET Password = PASSWORD("; static const char update_root_passwd_part2[]= - "') where User='root';\n"; + ") where User='root';\n"; static const char remove_default_user_cmd[]= "DELETE FROM mysql.user where User='';\n"; static const char allow_remote_root_access_cmd[]= @@ -589,11 +589,19 @@ static int create_db_instance() } /* Change root password if requested. */ - if (opt_password) + if (opt_password && opt_password[0]) { - verbose("Changing root password",remove_default_user_cmd); + verbose("Setting root password",remove_default_user_cmd); fputs(update_root_passwd_part1, in); - fputs(opt_password, in); + + /* Use hex encoding for password, to avoid escaping problems.*/ + fputc('0', in); + fputc('x', in); + for(int i= 0; opt_password[i]; i++) + { + fprintf(in,"%02x",opt_password[i]); + } + fputs(update_root_passwd_part2, in); fflush(in); } diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp index 81c9f7eea92..e943d1a58b8 100644 --- a/win/packaging/ca/CustomAction.cpp +++ b/win/packaging/ca/CustomAction.cpp @@ -71,6 +71,82 @@ LExit: return WcaFinalize(er); } +/* + Escape command line parameter fpr pass to CreateProcess(). + + We assume out has enough space to include encoded string + 2*wcslen(in) is enough. + + It is assumed that called will add double quotation marks before and after + the string. +*/ +static void EscapeCommandLine(const wchar_t *in, wchar_t *out) +{ + const wchar_t special_chars[]=L" \t\n\v\""; + bool needs_escaping= false; + size_t pos; + + for(int i=0; i< sizeof(special_chars) -1; i++) + { + if (wcschr(in, special_chars[i])) + { + needs_escaping = true; + break; + } + } + + if(!needs_escaping) + { + wcscpy(out, in); + return; + } + + pos= 0; + for(int i = 0 ; ; i++) + { + size_t n_backslashes = 0; + wchar_t c; + while (in[i] == L'\\') + { + i++; + n_backslashes++; + } + + c= in[i]; + if (c == 0) + { + /* + Escape all backslashes, but let the terminating double quotation mark + that caller adds be interpreted as a metacharacter. + */ + for(int j= 0; j < 2*n_backslashes;j++) + { + out[pos++]=L'\\'; + } + break; + } + else if (c == L'"') + { + /* + Escape all backslashes and the following double quotation mark. + */ + for(int j= 0; j < 2*n_backslashes + 1; j++) + { + out[pos++]=L'\\'; + } + out[pos++]= L'"'; + } + else + { + /* Backslashes aren't special here. */ + for (int j=0; j < n_backslashes; j++) + out[pos++] = L'\\'; + + out[pos++]= c; + } + } + out[pos++]= 0; +} /* Check for if directory is empty during install, sets "_NOT_EMPTY" otherise @@ -460,6 +536,8 @@ unsigned long long GetMaxBufferSize(unsigned long long totalPhys) return totalPhys; #endif } + + /* Checks SERVICENAME, PORT and BUFFERSIZE parameters */ @@ -468,6 +546,8 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall) wchar_t ServiceName[MAX_PATH]={0}; wchar_t SkipNetworking[MAX_PATH]={0}; wchar_t QuickConfig[MAX_PATH]={0}; + wchar_t Password[MAX_PATH]={0}; + wchar_t EscapedPassword[2*MAX_PATH+2]; wchar_t Port[6]; wchar_t BufferPoolSize[16]; DWORD PortLen=6; @@ -510,8 +590,12 @@ extern "C" UINT __stdcall CheckDatabaseProperties (MSIHANDLE hInstall) } } - DWORD SkipNetworkingLen= MAX_PATH; + DWORD PasswordLen= MAX_PATH; + MsiGetPropertyW (hInstall, L"PASSWORD", Password, &PasswordLen); + EscapeCommandLine(Password, EscapedPassword); + MsiSetPropertyW(hInstall,L"ESCAPEDPASSWORD",EscapedPassword); + DWORD SkipNetworkingLen= MAX_PATH; MsiGetPropertyW(hInstall, L"SKIPNETWORKING", SkipNetworking, &SkipNetworkingLen); MsiGetPropertyW(hInstall, L"PORT", Port, &PortLen); diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in index 37b12575328..2c01b024544 100644 --- a/win/packaging/extra.wxs.in +++ b/win/packaging/extra.wxs.in @@ -34,6 +34,7 @@