Server IP : 172.67.216.182 / Your IP : 162.158.170.44 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/plugin/innodb_memcached/innodb_memcache/include/ |
Upload File : |
#ifndef NDBMEMCACHE_KEYPREFIX_H #define NDBMEMCACHE_KEYPREFIX_H #include <stdio.h> /***** This section defines a data structures available to C. ***/ /* The prefix_info_t is the compacted form of the parts of the KeyPrefix that must be available to C code. */ /* The value of 13 imposes a limit of 8,192 prefixes */ #define KEY_PREFIX_BITS 13 #define MAX_KEY_PREFIXES ( 1 << KEY_PREFIX_BITS ) /* The value of 4 imposes a limit of 16 clusters */ #define CLUSTER_ID_BITS 4 #define MAX_CLUSTERS ( 1 << CLUSTER_ID_BITS ) typedef struct ndb_prefix_bitfield { unsigned usable : 1; unsigned use_ndb : 1; unsigned _unused1 : 1; unsigned prefix_id : KEY_PREFIX_BITS; unsigned do_mc_read : 1; unsigned do_db_read : 1; unsigned do_mc_write : 1; unsigned do_db_write : 1; unsigned do_mc_delete : 1; unsigned do_db_delete : 1; unsigned do_db_flush : 1; unsigned has_cas_col : 1; unsigned has_flags_col : 1; unsigned has_expire_col : 1; unsigned has_math_col : 1; unsigned cluster_id : CLUSTER_ID_BITS; } prefix_info_t; /***** This section is available to C++ only. ***/ #ifdef __cplusplus #include <sys/types.h> #include <string.h> #include <stdlib.h> #include "TableSpec.h" class KeyPrefix { public: /* public methods */ KeyPrefix(const char *name); KeyPrefix(const KeyPrefix &); ~KeyPrefix(); int cmp(const char *key, int nkey); void dump(FILE *) const; /* public instance variables */ TableSpec *table; prefix_info_t info; const char *prefix; const size_t prefix_len; }; /**** Inline methods for KeyPrefix ****/ inline int KeyPrefix::cmp(const char *key, int nkey) { return strncmp(prefix, key, prefix_len); }; #endif #endif