# Copyright (c) 2012, Oracle and/or its affiliates. All rights # reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including # but not limited to OpenSSL) that is licensed under separate terms, # as designated in a particular file or component or in included license # documentation. The authors of MySQL hereby grant you an additional # permission to link the program and your derivative works with the # separately licensed software that they have included with MySQL. # # 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, version 2.0, 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., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA # # This test checks if for .sym files (symbolic links on Windows) a depreciation warning # is existing in the error log. # Created by Horst Hunger # Creation date: 2012-11-01 --source include/windows.inc --source include/not_embedded.inc let MYSQLD_DATADIR= `select @@datadir`; perl; my $fname= "$ENV{'MYSQLD_DATADIR'}testdb.sym"; open(FILE, ">", $fname) or die; print FILE "$ENV{'MYSQLTEST_VARDIR'}/testdb"; close FILE; EOF --disable_warnings DROP DATABASE IF EXISTS testdb; --enable_warnings CREATE DATABASE testdb; USE testdb; CREATE TABLE t1 (a int not null auto_increment, b char(16) not null, primary key (a)) ENGINE=myisam ; INSERT INTO t1 (b) VALUES ("test"),("test1"),("test2"),("test3"); SELECT * from t1; perl; my $found_pattern = 0; my $fname= "$ENV{'MYSQLTEST_VARDIR'}/log/mysqld.1.err"; open(FILE, "<", $fname) or die; my @lines= <FILE>; # those must be in the file for the test to pass foreach my $one_line (@lines) { $found_pattern= 1 if ($one_line =~ /Symbolic links based on .sym files are deprecated/); } close FILE; print "Found: $found_pattern\n"; EOF DROP DATABASE testdb;