Skip to content

Annotation wangyang #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

*.cmake-build-debug/
*.idea/

*-t
*_test
*.Plo
Expand Down Expand Up @@ -3138,3 +3142,95 @@ storage/perfschema/gen_pfs_lex_token
sql/share/bulgarian
sql/lex_token.h
sql/gen_lex_token
cmake-build-debug/CMakeCache.txt
cmake-build-debug/MySQL.cbp
cmake-build-debug/cmd-line-utils/libedit/makelist
cmake-build-debug/Docs/INFO_SRC
cmake-build-debug/extra/jemalloc/tmp/jemalloc-cfgcmd.txt
cmake-build-debug/extra/jemalloc/tmp/jemalloc-cfgcmd.txt.in
cmake-build-debug/include/my_config.h
cmake-build-debug/include/mysql_version.h
cmake-build-debug/libmysql/libmysql.ver
cmake-build-debug/libmysql/libmysql_exports_file.cc
cmake-build-debug/mysql-test/mtr
cmake-build-debug/mysql-test/mysql-test-run
cmake-build-debug/mysql-test/mysql-test-run.pl
cmake-build-debug/packaging/rpm-docker/my.cnf
cmake-build-debug/packaging/rpm-fedora/my.cnf
cmake-build-debug/packaging/rpm-fedora/my_config.h
cmake-build-debug/packaging/rpm-fedora/mysql-5.6.16-mysql-install.patch
cmake-build-debug/packaging/rpm-fedora/mysql-systemd-start
cmake-build-debug/packaging/rpm-fedora/mysql.conf
cmake-build-debug/packaging/rpm-fedora/mysql_config.sh
cmake-build-debug/packaging/rpm-fedora/mysqld.service
cmake-build-debug/packaging/rpm-oel/filter-provides.sh
cmake-build-debug/packaging/rpm-oel/filter-requires.sh
cmake-build-debug/packaging/rpm-oel/my.cnf
cmake-build-debug/packaging/rpm-oel/my_config.h
cmake-build-debug/packaging/rpm-oel/mysql-5.6.16-mysql-install.patch
cmake-build-debug/packaging/rpm-oel/mysql-systemd-start
cmake-build-debug/packaging/rpm-oel/mysql.conf
cmake-build-debug/packaging/rpm-oel/mysql.init
cmake-build-debug/packaging/rpm-oel/mysql_config.sh
cmake-build-debug/packaging/rpm-oel/mysqld.service
cmake-build-debug/packaging/rpm-sles/filter-provides.sh
cmake-build-debug/packaging/rpm-sles/filter-requires.sh
cmake-build-debug/packaging/rpm-sles/my.cnf
cmake-build-debug/packaging/rpm-sles/my_config.h
cmake-build-debug/packaging/rpm-sles/mysql-systemd-start
cmake-build-debug/packaging/rpm-sles/mysql.conf
cmake-build-debug/packaging/rpm-sles/mysql.init
cmake-build-debug/packaging/rpm-sles/mysqld.service
cmake-build-debug/scripts/make_binary_distribution
cmake-build-debug/scripts/msql2mysql
cmake-build-debug/scripts/mysql_config
cmake-build-debug/scripts/mysql_config.pl
cmake-build-debug/scripts/mysql_convert_table_format
cmake-build-debug/scripts/mysql_find_rows
cmake-build-debug/scripts/mysql_fix_extensions
cmake-build-debug/scripts/mysql_install_db
cmake-build-debug/scripts/mysql_secure_installation
cmake-build-debug/scripts/mysql_setpermission
cmake-build-debug/scripts/mysql_zap
cmake-build-debug/scripts/mysqlaccess
cmake-build-debug/scripts/mysqlaccess.conf
cmake-build-debug/scripts/mysqlbug
cmake-build-debug/scripts/mysqld_multi
cmake-build-debug/scripts/mysqld_safe
cmake-build-debug/scripts/mysqldumpslow
cmake-build-debug/scripts/mysqlhotcopy
cmake-build-debug/sql/sql_builtin.cc
cmake-build-debug/sql-bench/bench-count-distinct
cmake-build-debug/sql-bench/bench-init.pl
cmake-build-debug/sql-bench/compare-results
cmake-build-debug/sql-bench/copy-db
cmake-build-debug/sql-bench/crash-me
cmake-build-debug/sql-bench/example.bat
cmake-build-debug/sql-bench/graph-compare-results
cmake-build-debug/sql-bench/innotest1
cmake-build-debug/sql-bench/innotest1a
cmake-build-debug/sql-bench/innotest1b
cmake-build-debug/sql-bench/innotest2
cmake-build-debug/sql-bench/innotest2a
cmake-build-debug/sql-bench/innotest2b
cmake-build-debug/sql-bench/pwd.bat
cmake-build-debug/sql-bench/README
cmake-build-debug/sql-bench/run-all-tests
cmake-build-debug/sql-bench/server-cfg
cmake-build-debug/sql-bench/test-alter-table
cmake-build-debug/sql-bench/test-ATIS
cmake-build-debug/sql-bench/test-big-tables
cmake-build-debug/sql-bench/test-connect
cmake-build-debug/sql-bench/test-create
cmake-build-debug/sql-bench/test-insert
cmake-build-debug/sql-bench/test-select
cmake-build-debug/sql-bench/test-transactions
cmake-build-debug/sql-bench/test-wisconsin
cmake-build-debug/sql-bench/uname.bat
cmake-build-debug/sql/share/dictionary.txt
cmake-build-debug/support-files/binary-configure
cmake-build-debug/support-files/my-default.cnf
cmake-build-debug/support-files/mysql-log-rotate
cmake-build-debug/support-files/mysql.server
cmake-build-debug/support-files/mysqld_multi.server
cmake-build-debug/support-files/plugins.files
34 changes: 2 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
# AliSQL
AliSQL is a MySQL branch originated from Alibaba Group. It is based on the MySQL official release and has many feature and performance enhancements. AliSQL has proven to be very stable and efficient in production environment. It can be used as a free, fully compatible, enhanced and open source drop-in replacement for MySQL.
������ AliSql ��������ע��

AliSQL has been an open source project since August 2016. It is being actively developed by engineers from Alibaba Group. Moreover, it includes patches from Percona, WebScaleSQL, and MariaDB. AliSQL is a fruit of community effort. Everyone is welcomed to get involved.
# AliSQL Release Notes

[Changes in AliSQL 5.6.32 (2018-05-01) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2018-05-01))
[Changes in AliSQL 5.6.32 (2018-01-24) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2018-01-24))
[Changes in AliSQL 5.6.32 (2017-10-10) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2017-10-10))
[Changes in AliSQL 5.6.32 (2017-07-16) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2017-07-16))
[Changes in AliSQL 5.6.32 (2017-05-04) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2017-05-04))
[Changes in AliSQL 5.6.32 (2017-02-14) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2017-02-14))
[Changes in AliSQL 5.6.32 (2016-12-25) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2016-12-25))
[Changes in AliSQL 5.6.32 (2016-11-11) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2016-11-11))
[Changes in AliSQL 5.6.32 (2016-10-14) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2016-10-14))
[Changes in AliSQL 5.6.32 (2016-09-15) ](https://github.com/alibaba/AliSQL/wiki/Changes-in-AliSQL-5.6.32-(2016-09-15))

## AliSQL Compiler Guide
[AliSQL-Compiler-Guide](http://blog.fungo.me/2016/10/compile-alisql-from-source/)

# AliSQL benchmark
[Performance benchmark ](https://github.com/alibaba/AliSQL/wiki/AliSQL-Performance-benchmark)
[Performance benchmark for inventory ](https://github.com/alibaba/AliSQL/wiki/AliSQL-Performance-benchmark-for-inventory)

# AliSQL wiki
[Wiki](https://github.com/alibaba/AliSQL/wiki)

# AliSQLBackup
[AliSQLBackup](https://github.com/alibaba/AliSQLBackup)
[AliSQLBackup.wiki](https://github.com/alibaba/AliSQLBackup/wiki)

## AliSQL Sequence Engine
[AliSQL-Sequence-Doc](https://github.com/alibaba/AliSQL/wiki/AliSQL-Sequence-Doc_C)
annotation ��֧
1 change: 1 addition & 0 deletions extra/innochecksum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ get_page_size(
flags = mach_read_from_4(buf + FIL_PAGE_DATA + FSP_SPACE_FLAGS);

/* srv_page_size is used by InnoDB code as UNIV_PAGE_SIZE */
//wangyang @@ ������������ pageSize
srv_page_size = *logical_page_size = fsp_flags_get_page_size(flags);

/* fsp_flags_get_zip_size() will return zero if not compressed. */
Expand Down
5 changes: 5 additions & 0 deletions include/my_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ typedef struct st_used_mem

typedef struct st_mem_root
{
// �����ڴ�
USED_MEM *free; /* blocks with free memory in it */
//��ʹ���ڴ�
USED_MEM *used; /* blocks almost without free memory */
//Ԥ�����ڴ�
USED_MEM *pre_alloc; /* preallocated block */
/* if block have less memory it will be put in 'used' list */
size_t min_malloc;
//��ʼ�� block_size Ĭ�� 1024
size_t block_size; /* initial block size */
// �ѷ���� block ����
unsigned int block_num; /* allocated blocks counter */
/*
first free block in queue test counter (if it exceed
Expand Down
7 changes: 6 additions & 1 deletion include/my_sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,12 @@ struct st_my_file_info

extern struct st_my_file_info *my_file_info;

/**
* wangyang ** st_hash ��ʹ�õĶ�̬����
*/
typedef struct st_dynamic_array
{
uchar *buffer;
uchar *buffer; //--> wangyang buffer �ַ�����
uint elements,max_element;
uint alloc_increment;
uint size_of_element;
Expand Down Expand Up @@ -825,6 +828,8 @@ extern void delete_dynamic(DYNAMIC_ARRAY *array);
extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
extern void freeze_size(DYNAMIC_ARRAY *array);
#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
//wangyang *** �����ʼ��ʱ�� ֻ��һ�� ��ͨ��ָ�룬���� char* ���ǻ�ת��Ϊ type ���ͣ��������Ⱦ�������
//����ֻ�� ��ȡ�����̬����� ij��λ��
#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
#define push_dynamic(A,B) insert_dynamic((A),(B))
#define reset_dynamic(array) ((array)->elements= 0)
Expand Down
8 changes: 7 additions & 1 deletion mysys/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
FALSE Ok
*/

/**
* wangyang @@ ��ʼ�� ��̬ ����
*/
my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
void *init_buffer, uint init_alloc,
uint alloc_increment)
Expand Down Expand Up @@ -129,7 +132,7 @@ my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void *element)

void *alloc_dynamic(DYNAMIC_ARRAY *array)
{
if (array->elements == array->max_element)
if (array->elements == array->max_element) //wangyang ��� elements�Ѿ��ﵽ������� ��ô ��Ҫ����
{
char *new_ptr;
if (array->buffer == (uchar *)(array + 1))
Expand All @@ -155,6 +158,9 @@ void *alloc_dynamic(DYNAMIC_ARRAY *array)
array->buffer= (uchar*) new_ptr;
array->max_element+=array->alloc_increment;
}
/**
* wangyang ������Ƕ�̬������ ����һ�� �µ�Ԫ��λ�� ��ʹ�� elements
*/
return array->buffer+(array->elements++ * array->size_of_element);
}

Expand Down
Loading