annotate t/bogus-commands.t @ 2:e28ab6bd21fa
Append/prepend commands.
Introduce new storage commands "append" and "prepend" for atomic value
modification. They follow generic storage commands interface as described in
doc/protocol.txt:
<command name> <key> <flags> <exptime> <bytes>\r\n
<data block>\r\n
Current implementation involves memcpy() twice to combine values on writing
(i.e. full resulting value are copied), but truly atomic (and even threadsafe).
author |
Maxim Dounin <mdounin@mdounin.ru> |
date |
Sun, 30 Sep 2007 04:14:57 +0400 |
parents |
30782bb1fc04 |
children |
|
rev |
line source |
0
|
1 #!/usr/bin/perl
|
|
2
|
|
3 use strict;
|
|
4 use Test::More tests => 1;
|
|
5 use FindBin qw($Bin);
|
|
6 use lib "$Bin/lib";
|
|
7 use MemcachedTest;
|
|
8
|
|
9 my $server = new_memcached();
|
|
10 my $sock = $server->sock;
|
|
11
|
|
12 print $sock "boguscommand slkdsldkfjsd\r\n";
|
|
13 is(scalar <$sock>, "ERROR\r\n", "got error back");
|