Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/plugins/t/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 1 kB image not shown  

Quelle  dialog.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: Shell {Shell[48] ADA[37] Haskell[37]} [Methode: maximale Elemente, drei Dimensionen]

#
# test for the client "dialog" plugin
#

--source include/not_embedded.inc

if (!$DIALOG_SO) {
  skip No dialog auth plugin;
}
if (!$DIALOG_EXAMPLES_SO) {
  skip No dialog auth plugin;
}

--replace_result .dll .so
eval install plugin three_attempts soname '$DIALOG_EXAMPLES_SO';
create user test_dialog identified via three_attempts using 'SECRET';
GRANT SELECT ON test.* TO test_dialog;

--write_file $MYSQLTEST_VARDIR/tmp/dialog_good.txt
foo
1234
SECRET
select user(), current_user();
EOF

--write_file $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
foo
1234
wrong
SECRET
EOF

--echo #
--echo # -pSECRET is picked up, no questions asked.
--echo #
--exec echo "select user(), current_user();"|$MYSQL_TEST -u test_dialog -pSECRET

--echo #
--echo # without -p. up to three questions are asked on the stdin.
--echo # authentication is successful, the correct password is on the third line
--echo #
--exec $MYSQL_TEST -u test_dialog < $MYSQLTEST_VARDIR/tmp/dialog_good.txt

--echo #
--echo # authentication is unsuccessful, first three lines are all wrong
--echo #
--error 1
--exec $MYSQL_TEST -u test_dialog < $MYSQLTEST_VARDIR/tmp/dialog_bad.txt

--remove_file $MYSQLTEST_VARDIR/tmp/dialog_good.txt
--remove_file $MYSQLTEST_VARDIR/tmp/dialog_bad.txt
drop user test_dialog;
uninstall plugin three_attempts;

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