config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/ndb_memcache/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/ndb_memcache/t/ttls_flags.test

# The include statement below is a temp one for tests that are yet to
#be ported to run with InnoDB,
#but needs to be kept for tests that would need MyISAM in future.
--source include/force_myisam_default.inc

--source include/have_ndb.inc
--source suite/ndb_memcache/include/have_memcache.inc

--perl

use strict;
use lib "lib/";
use My::Memcache;
use Data::Dumper;

my $port = $ENV{NDB_MEMCACHED_1_PORT} or die "Need NDB_MEMCACHED_1_PORT";

my $mc = My::Memcache->new();
my $r = $mc->connect("localhost",$port);

if($r == 0) {
  print STDERR "DID NOT CONNECT TO MEMCACHE AT PORT $port \n";
}

$mc->flush();

## Test expiry times
$mc->set_expires(0);    $mc->set("t:1", "Groen");  ## Will not expire
$mc->set_expires(3);    $mc->set("t:2", "Yello");  ## Expire in 3 seconds

sleep(1);
($mc->get("t:1") == "Groen")  || $mc->fail("Expected Groen");
($mc->get("t:2") == "Yello")  || $mc->fail("Expected Yello");

sleep(3); 
($mc->get("t:1") == "Groen")  || $mc->fail("Expected result Groen");
$mc->get("t:2")               && $mc->fail("Item should have expired");
($mc->{error} == "NOT_FOUND") || $mc->fail("Expected NOT_FOUND");

print "TTL Test OK \n";

# Test flags
$mc->set_expires(0);
$mc->set_flags(100);
$mc->set("t:12", "Con\tBrio");
$mc->set_flags(200);
$mc->set("t:13", "Sul ponticello");

$mc->set_flags(0);

$mc->get("t:12");
my $result = $mc->next_result();
($result->{flags} == 100)  || $mc->fail("Expected flags = 100; got: ", $result->{flags});

$mc->get("t:13");
$result = $mc->next_result();
($result->{flags} == 200)  || $mc->fail("Expected flags = 200; got: ", $result->{flags});

print "Flags Test OK \n";

EOF

USE ndbmemcache;
SELECT * FROM demo_table_tabs order by mkey;

Man Man