35 lines
851 B
Plaintext
35 lines
851 B
Plaintext
# 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
|
|
|
|
# Test the fundamental ability to connect to a memcached server,
|
|
# wait for it to become ready, set a value, and then retreive that
|
|
# value using mysql
|
|
|
|
--source suite/ndb_memcache/include/have_memcache.inc
|
|
|
|
--perl
|
|
|
|
use strict;
|
|
use lib "lib/";
|
|
use My::Memcache;
|
|
|
|
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";
|
|
}
|
|
else {
|
|
$mc->set("test_key_1", 1511);
|
|
}
|
|
|
|
EOF
|
|
|
|
SELECT string_value from ndbmemcache.demo_table where mkey='test_key_1';
|