~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSStrUtil.h

[patch 112/129] Merge patch for revision 1925 from InnoDB SVN:
revno: 1925
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6169
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6163
committer: calvin
timestamp: Thu 2009-11-12 12:40:43 +0000
message:
  branches/zip: add test case for bug#46676
  
  This crash is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
  But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
  Add test case to catch future regression.
added:
  mysql-test/innodb_bug46676.result 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.result
  mysql-test/innodb_bug46676.test 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.test
diff:
=== added file 'mysql-test/innodb_bug46676.result'

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#ifndef __CSUTIL_H__
30
30
#define __CSUTIL_H__
31
31
 
 
32
using namespace std;
 
33
 
32
34
#include "CSDefs.h"
33
35
 
34
 
const char      *cs_version();
35
 
 
36
36
void            cs_strcpy(size_t size, char *d, const char *s, size_t len);
37
37
void            cs_strcpy(size_t size, char *d, const char *s);
38
 
void            cs_strcpy_dottt(size_t size, char *d, const char *s, size_t len);
39
38
void            cs_strcpy_left(size_t size, char *d, const char *s, char ch);
40
39
void            cs_strcpy_right(size_t size, char *d, const char *s, char ch);
41
40
void            cs_strcat(size_t size, char *d, const char *s);
48
47
void            cs_strcat(size_t size, char *to, uint64_t i);
49
48
void            cs_strcat_hex(size_t size, char *to, uint64_t i);
50
49
void            cs_format_context(size_t size, char *buffer, const char *func, const char *file, int line);
51
 
int                     cs_path_depth(const char *path);
52
 
bool            cs_fixed_pattern(const char *path);
53
 
bool            cs_match_patern(const char *pattern, const char *str, bool ignore_case);
54
50
char            *cs_last_name_of_path(const char *path, int count);
55
51
char            *cs_last_name_of_path(const char *path);
56
 
char            *cs_last_directory_of_path(const char *path);
 
52
char            *cs_last_directory_of_path(char *path);
57
53
const char      *cs_find_extension(const char *file_name);
58
54
void            cs_remove_extension(char *file_name);
59
55
bool            cs_is_extension(const char *file_name, const char *ext);
68
64
char            *cs_strdup(int value);
69
65
char            *cs_strdup(const char *in_str, size_t len);
70
66
bool            cs_starts_with(const char *cstr, const char *w_cstr);
71
 
bool            cs_ends_with(const char *cstr, const char *w_cstr);
72
67
void            cs_make_absolute_path(size_t max, char *path, const char *rel_path, const char *cwd);
73
 
void            cs_replace_string(size_t size, char *into, const char *find_str, const char *str);
74
68
void            cs_replace_string(size_t size, char *into, const char ch, const char *str);
75
69
int64_t         cs_str_to_int8(const char *ptr, bool *overflow);
76
 
int64_t         cs_byte_size_to_int8(const char *ptr, bool *invalid = NULL);
77
 
uint64_t        cs_str_to_word8(const char *ptr, bool *overflow = NULL);
78
 
size_t          cs_hex_to_bin(size_t size, void *bin, const char *hex);
 
70
int64_t         cs_byte_size_to_int8(const char *ptr);
 
71
uint64_t        cs_str_to_word8(const char *ptr, bool *overflow);
79
72
size_t          cs_hex_to_bin(size_t size, void *bin, size_t len, const char *hex);
80
 
void            cs_bin_to_hex(size_t size, char *hex, size_t len, const void *bin);
 
73
size_t          cs_bin_to_hex(size_t size, char *hex, size_t len, const void *bin);
81
74
void            cs_strToUpper(char *ptr);
82
75
void            cs_strToLower(char *ptr);
83
76
 
84
 
const char *cs_version();
85
 
bool            cs_str_to_value(const char *ptr, uint32_t *value, uint8_t base);
86
77
#endif