Skip to content

Commit

Permalink
# This is a combination of 7 commits.
Browse files Browse the repository at this point in the history
# This is the 1st commit message:

fix(core): Double prepare on lex unit for cts with union(stoneatom#226)

fix(core): MTR + Double prepare on lex unit for ctas with union(stoneatom#226)

# This is the commit message #2:

rich doc to fix  env dependence "not found" (stoneatom#316)


# This is the commit message #3:

fix(mtr): make the mtr passed (stoneatom#315) (stoneatom#317)

[summary]
How to run:
./mysql-test-run.pl --suite=stonedb --nowarnings --force --nocheck-testcases

1. test cases below are failed, we ignored them first:
issue410
issue415
issue433
issue446
issue515
load.test
2. Sys variables next are not set correctly, they should be added to `/mysql-test/include/default_mysqld.cnf`.
stonedb_insert_delayed = 0
stonedb_ini_allowmysqlquerypath=1

3.check-testcases: A new MTR option to enforce strict cleanup:
https://dev.mysql.com/blog-archive/fail-check-testcases-a-new-mtr-option-to-enforce-strict-cleanup

In `mtr` comment:
```
Some options that control enabling a feature for normal test runs,
can be turned off by prepending 'no' to the option, e.g. --notimer.
This applies to reorder, timer, check-testcases and warnings.
```
Currently we turn off it first to make mtr run success.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
# This is the commit message #4:

feat(stonedb): update the copyright date time (stoneatom#321) (stoneatom#324)


# This is the commit message #5:

fix(core): fix crash when executing sql. (stoneatom#327) (stoneatom#328)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
# This is the commit message #6:

feat(index): Unified class member variable name with google style (stoneatom#311) (stoneatom#312)

[summary]
Class member name will be like:

class TableInfo {
  ...
 private:
  std::string table_name_;  // OK - underscore at end.
  static Pool<TableInfo>* pool_;  // OK.
};

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
# This is the commit message #7:

fix(mtr):move character_set to test.character_set, fix main mtr_test and innodb mtr_test(stoneatom#277) (stoneatom#335)

* fix(mtr):fix innodb mtr and mv some test to test/innodb

* fix(mtr):move character_set to test/main/

fix(mtr):mv main mtr character_set test to test/main/cahracter_set

fix(mtr):mv myisam error mtr-test to test/main/myisam

fix(mtr):add optimizer_switch to include/default_mysqld.cnf

* fix(mtr):fix main mtr optimizer_switch amd mv some test to test/main

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
xiaoguangye and mergify[bot] committed Aug 10, 2022
1 parent e58e757 commit 5fe392e
Show file tree
Hide file tree
Showing 117 changed files with 431 additions and 744 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/integration-compile-mtr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ jobs:
run: |
sudo cmake ./ \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_PREFIX=/stonedb56/install \
-DMYSQL_DATADIR=/stonedb56/install/data \
-DSYSCONFDIR=/stonedb56/install \
-DMYSQL_UNIX_ADDR=/stonedb56/install/tmp/mysql.sock \
-DCMAKE_INSTALL_PREFIX=/stonedb57/install \
-DMYSQL_DATADIR=/stonedb57/install/data \
-DSYSCONFDIR=/stonedb57/install \
-DMYSQL_UNIX_ADDR=/stonedb57/install/tmp/mysql.sock \
-DWITH_EMBEDDED_SERVER=OFF \
-DWITH_STONEDB_STORAGE_ENGINE=1 \
-DWITH_MYISAM_STORAGE_ENGINE=1 \
Expand All @@ -100,12 +100,9 @@ jobs:
sudo make VERBOSE=1 -j`nproc`
sudo make install -j`nproc`
#- name: mtr test
# run: |
# sudo mkdir -p /stonedb56/install/data/innodb
# sudo mkdir -p /stonedb56/install/binlog
# sudo mkdir -p /stonedb56/install/log
# sudo mkdir -p /stonedb56/install/tmp
# sudo chown -R mysql:mysql /stonedb56
# cd /stonedb56/install/mysql-test
# sudo ./mysql-test-run.pl --suite=stonedb --nowarnings --force
- name: mtr test
run: |
sudo mkdir -p /stonedb57/install/log
sudo chown -R mysql:mysql /stonedb57
cd /stonedb57/install/mysql-test
sudo ./mysql-test-run.pl --suite=stonedb --nowarnings --force --nocheck-testcases
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ build/
cscope*
sql/build_info.h
.vscode
.idea
VERSION.dep
CMakeCache
CMakeFiles
Expand Down
8 changes: 4 additions & 4 deletions client/base/help_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ void Mysql::Tools::Base::Options::Help_options::print_usage()

if (first_year_str == COPYRIGHT_NOTICE_CURRENT_YEAR)
{
copyright= ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_CURRENT_YEAR);
copyright= ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR);
}
else
{
#define FIRST_YEAR_CONSTANT "$first_year$"
string first_year_constant_str= FIRST_YEAR_CONSTANT;

copyright= ORACLE_WELCOME_COPYRIGHT_NOTICE(FIRST_YEAR_CONSTANT);
copyright= copyright.replace(copyright.find(first_year_constant_str),
first_year_constant_str.length(), first_year_str);
copyright= ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR);
/* copyright= copyright.replace(copyright.find(first_year_constant_str),
first_year_constant_str.length(), first_year_str);*/
}

printf("%s\n%s\n",
Expand Down
2 changes: 1 addition & 1 deletion client/check/mysqlcheck.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
puts("used at the same time. Not all options are supported by all storage engines.");
Expand Down
4 changes: 2 additions & 2 deletions client/mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ int main(int argc,char *argv[])
mysql_thread_id(&mysql), server_version_string(&mysql));
put_info((char*) glob_buffer.ptr(),INFO_INFO);

put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR), INFO_INFO);

if (!status.batch)
{
Expand Down Expand Up @@ -1925,7 +1925,7 @@ static void usage(int version)

if (version)
return;
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
/*
Turn default for zombies off so that the help on how to
Expand Down
4 changes: 2 additions & 2 deletions client/mysql_config_editor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ static void my_perror(const char *msg)
static void usage_command(int command)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2012"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("MySQL Configuration Utility.");
printf("\nDescription: %s\n", command_data[command].description);
printf("Usage: %s [program options] [%s [command options]]\n",
Expand All @@ -1483,7 +1483,7 @@ static void usage_command(int command)
static void usage_program(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2012"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("MySQL Configuration Utility.");
printf("Usage: %s [program options] [command [command options]]\n",
my_progname);
Expand Down
2 changes: 1 addition & 1 deletion client/mysql_install_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void print_version(const string &p)
void usage(const string &p)
{
print_version(p);
cout << ORACLE_WELCOME_COPYRIGHT_NOTICE("2015") << endl
cout << ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR) << endl
<< "MySQL Database Deployment Utility." << endl
<< "Usage: "
<< p
Expand Down
2 changes: 1 addition & 1 deletion client/mysql_secure_installation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void print_version(void)
static void usage()
{
print_version();
fprintf(stdout, ORACLE_WELCOME_COPYRIGHT_NOTICE("2013"));
fprintf(stdout, ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
fprintf(stdout, "\nMySQL Configuration Utility.");
fprintf(stdout, "Usage: %s [OPTIONS]\n", my_progname);
my_print_help(my_connection_options);
Expand Down
2 changes: 1 addition & 1 deletion client/mysql_ssl_rsa_setup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static
void usage(void)
{
print_version();
cout << (ORACLE_WELCOME_COPYRIGHT_NOTICE("2015")) << endl
cout << (ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR)) << endl
<< "MySQL SSL Certificate and RSA Key Generation Utility" << endl
<< "Usage : " << my_progname << " [OPTIONS]" << endl;

Expand Down
4 changes: 2 additions & 2 deletions client/mysqladmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
case ADMIN_VER:
new_line=1;
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
Expand Down Expand Up @@ -1279,7 +1279,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("Administration program for the mysqld daemon.");
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
/*
Expand Down
2 changes: 1 addition & 1 deletion client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2070,7 +2070,7 @@ static void print_version()
static void usage()
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("\
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
the mysql command line client.\n\n");
Expand Down
2 changes: 1 addition & 1 deletion client/mysqldump.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ static void usage(void)
{
struct my_option *optp;
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("Dumping structure and contents of MySQL databases and tables.");
short_usage_sub();
#if defined(STONEDB)
Expand Down
2 changes: 1 addition & 1 deletion client/mysqlimport.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static void usage(void)
{
struct my_option *optp;
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("\
Loads tables from text files in various formats. The base name of the\n\
text file must be the name of the table that should be used.\n\
Expand Down
2 changes: 1 addition & 1 deletion client/mysqlshow.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static void usage(void)
{
struct my_option *optp;
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
puts("\n\
Expand Down
2 changes: 1 addition & 1 deletion client/mysqlslap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ static void usage(void)
{
struct my_option *optp;
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("Run a query multiple times against the server.\n");
printf("Usage: %s [OPTIONS]\n",my_progname);
print_defaults("my",load_default_groups);
Expand Down
2 changes: 1 addition & 1 deletion client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7200,7 +7200,7 @@ void print_version(void)
void usage()
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
my_print_help(my_long_options);
Expand Down
2 changes: 1 addition & 1 deletion extra/innochecksum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("InnoDB offline file checksum utility.\n");
printf("Usage: %s [-c] [-s <start page>] [-e <end page>] "
"[-p <page>] [-v] [-a <allow mismatches>] [-n] "
Expand Down
2 changes: 1 addition & 1 deletion extra/lz4_decompress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static void usage()
{
printf("%s Ver 1.7 for %s at %s\n","lz4_decompress",SYSTEM_TYPE,
MACHINE_TYPE);
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2015"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("Decompress data compressed by mysqlpump using lz4 compression "
"algorithm by reading from input file and writing uncompressed "
"data to output file");
Expand Down
2 changes: 1 addition & 1 deletion extra/my_print_defaults.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void usage(my_bool version)
MACHINE_TYPE);
if (version)
return;
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
puts("Prints all arguments that is give to some program using the default files");
printf("Usage: %s [OPTIONS] groups\n", my_progname);
my_print_help(my_long_options);
Expand Down
2 changes: 1 addition & 1 deletion extra/perror.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("Print a description for a system error code or a MySQL error code.\n");
printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
Expand Down
2 changes: 1 addition & 1 deletion extra/resolve_stack_dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static void print_version(void)
static void usage()
{
print_version();
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2001"));
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE(COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR));
printf("Resolve numeric stack strace dump into symbols.\n\n");
printf("Usage: %s [OPTIONS] symbols-file [numeric-dump-file]\n",
my_progname);
Expand Down
1 change: 1 addition & 0 deletions include/welcome_copyright_notice.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#ifndef _welcome_copyright_notice_h_
#define _welcome_copyright_notice_h_

#define COPYRIGHT_NOTICE_STONEDB_BEGIN_YEAR "2021"
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2022"

/*
Expand Down
4 changes: 4 additions & 0 deletions mysql-test/include/default_mysqld.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ slave-net-timeout=120

log-bin=mysqld-bin

optimizer_switch='index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,duplicateweedout=on,subquery_materialization_cost_based=on,use_index_extensions=on,condition_fanout_filter=on,derived_merge=on,prefer_ordering_index=on'

# MAINTAINER:
# the loose- syntax is to make sure the cnf file is also
# valid when building without the performance schema.
Expand Down Expand Up @@ -75,3 +77,5 @@ binlog-direct-non-transactional-updates

loose-show-compatibility-56=ON

stonedb_insert_delayed = 0
stonedb_ini_allowmysqlquerypath=1
4 changes: 2 additions & 2 deletions mysql-test/r/mysqld--help-notwin.result
Original file line number Diff line number Diff line change
Expand Up @@ -1404,11 +1404,11 @@ block-encryption-mode aes-128-ecb
bulk-insert-buffer-size 8388608
character-set-client-handshake TRUE
character-set-filesystem binary
character-set-server utf8mb4
character-set-server utf8
character-sets-dir MYSQL_CHARSETSDIR/
check-proxy-users FALSE
chroot (No default value)
collation-server utf8mb4_general_ci
collation-server utf8_general_ci
completion-type NO_CHAIN
concurrent-insert AUTO
connect-timeout 10
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/r/mysqld_daemon.result
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Database
information_schema
cache
mtr
mysql
performance_schema
sys
sys_stonedb
test
4 changes: 4 additions & 0 deletions mysql-test/r/mysqld_safe.result
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
use test;
Database
information_schema
cache
mtr
mysql
performance_schema
sys
sys_stonedb
test
Database
information_schema
cache
mtr
mysql
performance_schema
sys
sys_stonedb
test
2 changes: 1 addition & 1 deletion mysql-test/r/mysqldump_bugs.result
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db4` /*!40100 DEFAULT CHARACTER SET la

USE `db4`;

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mtr` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mtr` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `mtr`;

Expand Down
4 changes: 4 additions & 0 deletions mysql-test/r/mysqlpump_extended.result
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ DROP DATABASE db1_extended;
SHOW DATABASES;
Database
information_schema
cache
db2_extended
mtr
mysql
performance_schema
sys
sys_stonedb
test
DROP DATABASE db2_extended;
# test exclude-events
Expand Down Expand Up @@ -171,12 +173,14 @@ DROP DATABASE db4_extended;
SHOW DATABASES;
Database
information_schema
cache
db2_extended
db4_extended
mtr
mysql
performance_schema
sys
sys_stonedb
test
DROP DATABASE db2_extended;
DROP DATABASE db4_extended;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/innodb/r/innodb-system-table-view.result
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ table_id pos mtype prtype len name
25 4 13 2163198 24 Abbreviation
26 0 6 1288 8 Transition_time
26 1 6 1283 4 Correction
32 0 13 2949630 144 source_uuid
32 0 13 2163198 108 source_uuid
32 1 6 1288 8 interval_start
32 2 6 1288 8 interval_end
33 0 12 2162959 192 cost_name
Expand Down
Loading

0 comments on commit 5fe392e

Please sign in to comment.