MySQL 8.4.2
Source Code Documentation
test_string_service_charset.cc File Reference
#include <fcntl.h>
#include <mysql/components/component_implementation.h>
#include <mysql/components/service_implementation.h>
#include <mysql/components/services/mysql_string.h>
#include <stdio.h>
#include "m_string.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "sql_string.h"
#include "test_string_service_long.h"

Macros

#define MAX_BUFFER_LENGTH   128
 
#define WRITE_LOG(format, lit_log_text)
 
#define TEST_TEXT_LIT_LENGTH   48
 

Functions

bool test_charset (const char *charset, const char *text, int buff_len)
 This file contains a test (example) component, which tests the service "string". More...
 
mysql_service_status_t test_string_service_init ()
 Initialization entry method for test component. More...
 
mysql_service_status_t test_string_service_deinit ()
 De-initialization method for Component. More...
 
 END_COMPONENT_PROVIDES ()
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_factory)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_converter)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_character_access)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_byte_access)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_case)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_iterator)
 
 REQUIRES_SERVICE_PLACEHOLDER (mysql_string_ctype)
 
 REQUIRES_SERVICE (mysql_string_factory)
 
 REQUIRES_SERVICE (mysql_string_converter)
 
 REQUIRES_SERVICE (mysql_string_character_access)
 
 REQUIRES_SERVICE (mysql_string_byte_access)
 
 REQUIRES_SERVICE (mysql_string_case)
 
 REQUIRES_SERVICE (mysql_string_iterator)
 
 REQUIRES_SERVICE (mysql_string_ctype)
 
 END_COMPONENT_REQUIRES ()
 
 METADATA ("mysql.author", "Oracle Corporation")
 
 METADATA ("mysql.license", "GPL")
 
 METADATA ("test_string_charset_service", "1")
 
 END_COMPONENT_METADATA ()
 

Variables

FILE * outfile
 
int log_text_len = 0
 
char log_text [MAX_BUFFER_LENGTH+16]
 
mysql_component_t mysql_component_test_string_service_charset
 

Macro Definition Documentation

◆ MAX_BUFFER_LENGTH

#define MAX_BUFFER_LENGTH   128

◆ TEST_TEXT_LIT_LENGTH

#define TEST_TEXT_LIT_LENGTH   48

◆ WRITE_LOG

#define WRITE_LOG (   format,
  lit_log_text 
)
Value:
log_text_len = sprintf(log_text, format, lit_log_text); \
if (fwrite((uchar *)log_text, sizeof(char), log_text_len, outfile) != \
static_cast<size_t>(log_text_len)) \
return true;
unsigned char uchar
Definition: my_inttypes.h:52
int log_text_len
Definition: test_string_service_charset.cc:40
char log_text[MAX_BUFFER_LENGTH+16]
Definition: test_string_service_charset.cc:41
FILE * outfile
Definition: test_string_service_charset.cc:36

Function Documentation

◆ END_COMPONENT_METADATA()

END_COMPONENT_METADATA ( )

◆ END_COMPONENT_PROVIDES()

END_COMPONENT_PROVIDES ( )

◆ END_COMPONENT_REQUIRES()

END_COMPONENT_REQUIRES ( )

◆ METADATA() [1/3]

METADATA ( "mysql.author"  ,
"Oracle Corporation"   
)

◆ METADATA() [2/3]

METADATA ( "mysql.license"  ,
"GPL"   
)

◆ METADATA() [3/3]

METADATA ( "test_string_charset_service"  ,
"1"   
)

◆ REQUIRES_SERVICE() [1/7]

REQUIRES_SERVICE ( mysql_string_byte_access  )

◆ REQUIRES_SERVICE() [2/7]

REQUIRES_SERVICE ( mysql_string_case  )

◆ REQUIRES_SERVICE() [3/7]

REQUIRES_SERVICE ( mysql_string_character_access  )

◆ REQUIRES_SERVICE() [4/7]

REQUIRES_SERVICE ( mysql_string_converter  )

◆ REQUIRES_SERVICE() [5/7]

REQUIRES_SERVICE ( mysql_string_ctype  )

◆ REQUIRES_SERVICE() [6/7]

REQUIRES_SERVICE ( mysql_string_factory  )

◆ REQUIRES_SERVICE() [7/7]

REQUIRES_SERVICE ( mysql_string_iterator  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [1/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_byte_access  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [2/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_case  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [3/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_character_access  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [4/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_converter  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [5/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_ctype  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [6/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_factory  )

◆ REQUIRES_SERVICE_PLACEHOLDER() [7/7]

REQUIRES_SERVICE_PLACEHOLDER ( mysql_string_iterator  )

◆ test_charset()

bool test_charset ( const char *  charset,
const char *  text,
int  buff_len 
)

This file contains a test (example) component, which tests the service "string".

◆ test_string_service_deinit()

mysql_service_status_t test_string_service_deinit ( )

De-initialization method for Component.

◆ test_string_service_init()

mysql_service_status_t test_string_service_init ( )

Initialization entry method for test component.

It executes the tests of the service.

Variable Documentation

◆ log_text

char log_text[MAX_BUFFER_LENGTH+16]

◆ log_text_len

int log_text_len = 0

◆ mysql_component_test_string_service_charset

mysql_component_t mysql_component_test_string_service_charset
Initial value:
= { "mysql:test_string_service_charset" , __test_string_service_charset_provides, __test_string_service_charset_requires, __test_string_service_charset_metadata,
mysql_service_status_t test_string_service_init()
Initialization entry method for test component.
Definition: test_string_service_charset.cc:163
mysql_service_status_t test_string_service_deinit()
De-initialization method for Component.
Definition: test_string_service_charset.cc:198

◆ outfile

FILE* outfile