Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  system_timezone.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: Abap {ABAP[100] SQL[87] VDM[87]} [Methode: maximale Elemente, drei Dimensionen]

--source include/not_msan.inc
--source ../include/have_mysqld_safe.inc

# 1) Set valiables to be used in parameters of mysqld_safe.
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let $MYSQL_BASEDIR= `SELECT @@basedir`;
let $MYSQL_SOCKET= `SELECT @@socket`;
let $MYSQL_TIMEZONE= `SELECT @@time_zone`;
let $MYSQL_PIDFILE= `SELECT @@pid_file`;
let $MYSQL_PORT= `SELECT @@port`;
let $MYSQL_MESSAGESDIR= `SELECT @@lc_messages_dir`;
let $start_page_size= `select @@innodb_page_size`;
let $other_page_size_k=    `SELECT $start_page_size DIV 1024`;
let $other_page_size_nk=       `SELECT CONCAT($other_page_size_k,'k')`;

# mysqld_path to be passed to --ledir
# use test;
perl;
 my $dir = $ENV{'MYSQLTEST_VARDIR'};
 open ( OUTPUT, ">$dir/tmp/mysqld_path_file.inc") ;
 my $path = $ENV{MYSQLD};
 $path =~ /^(.*)\/([^\/]*)$/;
 print OUTPUT "let \$mysqld_path = $1;\n";
 print OUTPUT "let \$mysqld_bin = $2;\n";
 close (OUTPUT);
EOF

#Get the value of the variable from to MTR, from perl
--source  $MYSQLTEST_VARDIR/tmp/mysqld_path_file.inc

#Remove the temp file
--remove_file $MYSQLTEST_VARDIR/tmp/mysqld_path_file.inc

# 2) Shutdown mysqld which is started by mtr.
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
--shutdown_server
--source include/wait_until_disconnected.inc

# # 3) Run the mysqld_safe script with exec.
--exec sh $MYSQLD_SAFE --defaults-file=$MYSQLTEST_VARDIR/my.cnf --log-error=$MYSQLTEST_VARDIR/log/err.log --basedir=$MYSQL_BASEDIR --ledir=$mysqld_path --mysqld=$mysqld_bin --datadir=$MYSQLD_DATADIR --socket=$MYSQL_SOCKET --pid-file=$MYSQL_PIDFILE --port=$MYSQL_PORT --timezone=GMT-11 --log-output=file --loose-debug-sync-timeout=600 --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB  --secure-file-priv="" --core-file --lc-messages-dir=$MYSQL_MESSAGESDIR --innodb-page-size=$other_page_size_nk < /dev/null > /dev/null 2>&1 &
# mysqld_safe takes some time to start mysqld
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect

connection default;


# 4) Check the timezone settings.
SHOW VARIABLES LIKE '%time%zone%';

SET time_zone='+00:00';
CREATE TABLE t_duckdb (id INT PRIMARY KEY, a timestamp, b datetime) ENGINE=duckdb;
CREATE TABLE t_innodb (id INT PRIMARY KEY, a timestamp, b datetime) ENGINE=innodb;
INSERT INTO t_duckdb VALUES (1, '2020-01-01 00:00:00', '1970-01-01 00:00:00');
INSERT INTO t_innodb VALUES (1, '2020-01-01 00:00:00', '1970-01-01 00:00:00');

SET time_zone=system; # system timezone is configured --timezone=GMT-11 by mysqld_safe
SELECT * FROM t_innodb WHERE a < '2020-01-01 11:00:01' and a > '2020-01-01 10:59:59' and b < '1970-01-01 12:00:01' and b > '1969-12-31 23:59:00';
SELECT * FROM t_duckdb WHERE a < '2020-01-01 11:00:01' and a > '2020-01-01 10:59:59' and b < '1970-01-01 12:00:01' and b > '1969-12-31 23:59:00';


--exec $MYSQLADMIN -h localhost -S $MYSQL_SOCKET -P $MYSQL_PORT -u root shutdown 2>&e='color: green'>1
--source include/wait_until_disconnected.inc

--exec echo "wait" > $_expect_file_name
--exec sh $MYSQLD_SAFE --defaults-file=$MYSQLTEST_VARDIR/my.cnf --log-error=$MYSQLTEST_VARDIR/log/err.log --basedir=$MYSQL_BASEDIR --ledir=$mysqld_path --mysqld=$mysqld_bin --datadir=$MYSQLD_DATADIR --socket=$MYSQL_SOCKET --pid-file=$MYSQL_PIDFILE --port=$MYSQL_PORT --timezone=CST --log-output=file --loose-debug-sync-timeout=600 --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB  --secure-file-priv=""  --core-file --lc-messages-dir=$MYSQL_MESSAGESDIR --innodb-page-size=$other_page_size_nk < /dev/null > /dev/null 2>&1 &
# mysqld_safe takes some time to start mysqld
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
connection default;

SET time_zone=system; # system timezone is configured --timezone=CST by mysqld_safe
SELECT * FROM t_innodb WHERE a < '2020-01-01 00:00:01' and a > '2019-12-31 10:59:59' and b < '1970-01-01 12:00:01' and b > '1969-12-31 23:59:00';
SELECT * FROM t_duckdb WHERE a < '2020-01-01 00:00:01' and a > '2019-12-31 10:59:59' and b < '1970-01-01 12:00:01' and b > '1969-12-31 23:59:00';

DROP TABLE t_duckdb;
DROP TABLE t_innodb;

--exec $MYSQLADMIN -h localhost -S $MYSQL_SOCKET -P $MYSQL_PORT -u root shutdown 2>&e='color: green'>1
--source include/wait_until_disconnected.inc

--exec echo "restart" > $_expect_file_name
--enable_reconnect
--source include/wait_until_connected_again.inc

[Dauer der Verarbeitung: 0.18 Sekunden, vorverarbeitet 2026-10-08]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1897691