Annotation of embedaddon/php/ext/mysqli/tests/bug52082.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #52082 (character_set_client & character_set_connection reset after mysqli_change_user)
        !             3: --SKIPIF--
        !             4: <?php
        !             5: require_once('skipif.inc');
        !             6: require_once('skipifemb.inc');
        !             7: require_once('skipifconnectfailure.inc');
        !             8: ?>
        !             9: --FILE--
        !            10: <?php
        !            11:        require_once("connect.inc");
        !            12:        $link = mysqli_init();
        !            13:        $link->options(MYSQLI_SET_CHARSET_NAME, "latin2");
        !            14:        if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
        !            15:                die("can't connect");
        !            16:        }
        !            17:        var_dump($link->query("show variables like 'character_set_client'")->fetch_row());
        !            18:        var_dump($link->query("show variables like 'character_set_connection'")->fetch_row());
        !            19:        $link->change_user($user, $passwd, $db);
        !            20:        var_dump($link->query("show variables like 'character_set_client'")->fetch_row());
        !            21:        var_dump($link->query("show variables like 'character_set_connection'")->fetch_row());
        !            22: 
        !            23:        print "done!";
        !            24: ?>
        !            25: --EXPECTF--
        !            26: array(2) {
        !            27:   [0]=>
        !            28:   string(20) "character_set_client"
        !            29:   [1]=>
        !            30:   string(6) "latin2"
        !            31: }
        !            32: array(2) {
        !            33:   [0]=>
        !            34:   string(24) "character_set_connection"
        !            35:   [1]=>
        !            36:   string(6) "latin2"
        !            37: }
        !            38: array(2) {
        !            39:   [0]=>
        !            40:   string(20) "character_set_client"
        !            41:   [1]=>
        !            42:   string(6) "latin2"
        !            43: }
        !            44: array(2) {
        !            45:   [0]=>
        !            46:   string(24) "character_set_connection"
        !            47:   [1]=>
        !            48:   string(6) "latin2"
        !            49: }
        !            50: done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>