Commit 1d64408c authored by serg@sergbook.mysql.com's avatar serg@sergbook.mysql.com

Merge bk-internal:/home/bk/mysql-5.0

into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
parents a2219567 a1ffb002
...@@ -164,26 +164,34 @@ check_cpu () { ...@@ -164,26 +164,34 @@ check_cpu () {
cc_ver=`$cc --version | sed 1q` cc_ver=`$cc --version | sed 1q`
cc_verno=`echo $cc_ver | sed -e 's/^.*gcc/gcc/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'` cc_verno=`echo $cc_ver | sed -e 's/^.*gcc/gcc/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'`
set -- `echo $cc_verno | tr '.' ' '`
cc_major=$1
cc_minor=$2
cc_patch=$3
cc_comp=`expr $cc_major '*' 100 '+' $cc_minor`
case "$cc_ver--$cc_verno" in case "$cc_ver--$cc_verno" in
*GCC*) *GCC*)
# different gcc backends (and versions) have different CPU flags # different gcc backends (and versions) have different CPU flags
case `gcc -dumpmachine` in case `gcc -dumpmachine` in
i?86-*) i?86-*)
case "$cc_verno" in if test "$cc_comp" -lt 304
3.4*|3.5*|4.*) then
check_cpu_args='-mtune=$cpu_arg -march=$cpu_arg' check_cpu_args='-mcpu=$cpu_arg'
;; else
*) check_cpu_args='-mtune=$cpu_arg'
check_cpu_args='-mcpu=$cpu_arg -march=$cpu_arg' fi
;;
esac
;; ;;
ppc-*) ppc-*)
check_cpu_args='-mcpu=$cpu_arg -mtune=$cpu_arg' check_cpu_args='-mcpu=$cpu_arg -mtune=$cpu_arg'
;; ;;
x86_64-*) x86_64-*)
check_cpu_args='-mtune=$cpu_arg' if test "$cc_comp" -lt 304
then
check_cpu_args='-mcpu=$cpu_arg'
else
check_cpu_args='-mtune=$cpu_arg'
fi
;; ;;
*) *)
check_cpu_cflags="" check_cpu_cflags=""
......
...@@ -86,13 +86,17 @@ ENDIF(CYBOZU) ...@@ -86,13 +86,17 @@ ENDIF(CYBOZU)
# in some places we use DBUG_OFF # in some places we use DBUG_OFF
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D DBUG_OFF") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D DBUG_OFF")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -D DBUG_OFF")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D DBUG_OFF") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D DBUG_OFF")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -D DBUG_OFF")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /wd4996")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /wd4996")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8") ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
...@@ -104,10 +108,14 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR ...@@ -104,10 +108,14 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
${CMAKE_C_FLAGS_DEBUG_INIT}) ${CMAKE_C_FLAGS_DEBUG_INIT})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE
${CMAKE_C_FLAGS_RELEASE}) ${CMAKE_C_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO
${CMAKE_C_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG
${CMAKE_C_FLAGS_DEBUG}) ${CMAKE_C_FLAGS_DEBUG})
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE
${CMAKE_CXX_FLAGS_RELEASE}) ${CMAKE_CXX_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO
${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG
${CMAKE_CXX_FLAGS_DEBUG}) ${CMAKE_CXX_FLAGS_DEBUG})
......
COPYING INSTALL-SOURCE
COPYING.LIB
INSTALL-BINARY INSTALL-BINARY
Makefile Makefile
Makefile.in Makefile.in
Manual-updates
before-gpl-changes-manual.texi
include.texi
manual-before-gpl.texi
manual-tmp.aux
manual-tmp.cp
manual-tmp.fn
manual-tmp.ky
manual-tmp.log
manual-tmp.pdf
manual-tmp.pg
manual-tmp.texi
manual-tmp.toc
manual-tmp.tp
manual-tmp.vr
manual.aux
manual.cp
manual.cps
manual.fn
manual.fns
manual.html
manual.ky
manual.log
manual.pdf
manual.pg
manual.toc
manual.tp
manual.txt
manual.vr
manual_a4.ps
manual_a4.ps.gz
manual_letter.ps
manual_letter.ps.gz
manual_toc.html
mysql.info mysql.info
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
manual.html
manual_toc.html
--- alt-multi.c Sun Apr 14 10:03:19 2002
+++ multi.c Tue May 22 20:52:33 2001
@@ -287,7 +287,7 @@
&& *params != '\n' && *params != '@')
params++;
setup_output_environment (i,
- (int) ((columnfrac * 100.00) + 0.49));
+ (int) (columnfrac * (fill_column - current_indent) + .5));
}
}
This diff is collapsed.
Mail by sasha, should be rewritten as a HOWTO sometimes
vva added point C) for Windows-project
-----------
I have set up a repository with BitKeeper on work. There are still some things
about it that I would like to learn, but I have gotten far enough with it to
replace CVS functionality were are currently using, so let's just go ahead and
get started on it. Please follow the instructions below (make sure to save the
message for future reference):
a) http://www.bitmover.com/download
user: beta
password: get bitkeeper
get the version appropriate for your platform - download it to a temp
directory, chmod +x and then run it. You will have to tell it which directory
to install, for consistency, let's use /usr/local/bin
b) we will take advantage of bk capablity of working with master/slave
repositories. The master will be on work.mysql.com, the slaves will be our
individual machines. The master repository has already been set up on work, so
you will need just to set up a slave repository on your machine:
mkdir bk
cd bk
bk clone yourusername@work:/home/bk/mysql mysql
cd mysql
bk -r edit
Now you have the entire source tree in the current directory. Let's compile it:
BUILD/compile-pentium-debug
C) Windows project.
- Compile Linux-project (see points above)
- run VC++Files/prepare
- make repository accessible for Windows (using samba)
- open VC++Files/mysql.dsw in Microsoft Visual Stidio (5.0 or above)
After you edit a file, you need to check it in using bk citool or bk ci
filename. Note that ci is different than commit - you ci a file, but you commit
a change set. This is a very nice concept - instead of thinking of each
individual file as CVS does, bk groups the changes you are making and allows you
to document what you actually did between the commits as a whole, rather than
just commenting on every file. When you commit, bk will ask you to comment on
the change set.
Commit is done just to your local repository. To make your changes global, you
will need to run bk push. Be careful with that - it is a good idea to run bk
push -l -n first too see what you are just about to push to the master
repository.
When somebody does a push, you will be getting a email ( I will set this up to
day). You will then need to execute bk pull to update your sources. If there are
any conflicts, bk will force you to resolve them by asking you questions on what
to do with each conflict.
To learn more about bk, use bk helptool - I will be doing this a lot in the next
couple of days :-) If you find bugs or have questions/feature
suggestions/comments for developers, feel free to e-mail dev@bitmover.com .
Their developers, and especially the president of the company Larry McVoy really
like MySQL and are very anxious to help us. Make sure it is obvious that you
work for MySQL, of course. And, of course, do not bug them with little things
that you can figure out on your own or with my help - they were nice to offer us
support, but we should not abuse it.
\ No newline at end of file
\input texinfo @c -*-texinfo-*-
@c
@c *********************************************************
@c
@c This is a dummy placeholder file for internals.texi in the
@c MySQL source trees.
@c
@c Note, that the internals documentation has been moved into a separate
@c BitKeeper source tree named "mysqldoc" - do not attempt to edit this
@c file! All changes to internals.texi should be done in the mysqldoc tree.
@c
@c See http://www.mysql.com/doc/en/Installing_source_tree.html
@c for information about how to work with BitKeeper source trees.
@c
@c This dummy file is being replaced with the actual file from the
@c mysqldoc tree when building the official source distribution.
@c
@c Please e-mail docs@mysql.com for more information or if
@c you are interested in doing a translation.
@c
@c *********************************************************
@c
@c %**start of header
@setfilename internals.info
@c We want the types in the same index
@syncodeindex tp fn
@ifclear tex-debug
@c This removes the black squares in the right margin
@finalout
@end ifclear
@c Set background for HTML
@set _body_tags BGCOLOR=silver TEXT=#000000 LINK=#101090 VLINK=#7030B0
@c Set some style elements for the manual in HTML form. 'suggested'
@c natural language colors: aqua, black, blue, fuchsia, gray, green,
@c lime, maroon, navy, olive, purple, red, silver, teal, white, and
@c yellow. From Steeve Buehler <ahr@YogElements.com>
@set _extra_head <style> code {color:purple} tt {color:green} samp {color:navy} pre {color:maroon} </style>
@settitle Dummy MySQL internals documentation for version @value{mysql_version}.
@c We want single-sided heading format, with chapters on new pages. To
@c get double-sided format change 'on' below to 'odd'
@setchapternewpage on
@paragraphindent 0
@c %**end of header
@ifinfo
@format
START-INFO-DIR-ENTRY
* mysql: (mysql). MySQL documentation.
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@titlepage
@sp 10
@center @titlefont{Empty placeholder for the MySQL Internals Documentation}
@sp 10
@center Copyright @copyright{} 1995-2003 MySQL AB
@c blank page after title page makes page 1 be a page front.
@c also makes the back of the title page blank.
@page
@end titlepage
@c This should be added. The HTML conversion also needs a MySQL version
@c number somewhere.
@iftex
@c change this to double if you want formatting for double-sided
@c printing
@headings single
@oddheading @thischapter @| @| @thispage
@evenheading @thispage @| @| MySQL Internal Reference for Version @value{mysql_version}
@end iftex
@node Top, (dir), (dir), (dir)
@ifinfo
This is an empty placeholder file for the MySQL internals documentation.
The real version of this file is now maintained in a separate BitKeeper
source tree! Please see
@url{http://www.mysql.com/doc/en/Installing_source_tree.html} for more info
on how to work with BitKeeper.
Please do not attempt to edit this file directly - use the one in the
@code{mysqldoc} BK tree instead.
This file will be replaced with the current @code{internals.texi} when
building the official source distribution.
@end ifinfo
@bye
[Note this information is obsolete]
Notes on compiling glibc for the standard MySQL binary: Notes on compiling glibc for the standard MySQL binary:
- make sure you have gcc 2.95 and gmake 3.79 or newer - make sure you have gcc 2.95 and gmake 3.79 or newer
......
Functions i mysys: (For flags se my_sys.h)
int my_copy _A((const char *from,const char *to,myf MyFlags));
- Copy file
int my_delete _A((const char *name,myf MyFlags));
- Delete file
int my_getwd _A((string buf,uint size,myf MyFlags));
int my_setwd _A((const char *dir,myf MyFlags));
- Get and set working directory
string my_tempnam _A((const char *pfx,myf MyFlags));
- Make a uniq temp file name by using dir and adding something after
pfx to make name uniq. Name is made by adding a uniq 6 length-string
and TMP_EXT after pfx.
Returns pointer to malloced area for filename. Should be freed by
free().
File my_open _A((const char *FileName,int Flags,myf MyFlags));
File my_create _A((const char *FileName,int CreateFlags,
int AccsesFlags, myf MyFlags));
int my_close _A((File Filedes,myf MyFlags));
uint my_read _A((File Filedes,byte *Buffer,uint Count,myf MyFlags));
uint my_write _A((File Filedes,const byte *Buffer,uint Count,
myf MyFlags));
ulong my_seek _A((File fd,ulong pos,int whence,myf MyFlags));
ulong my_tell _A((File fd,myf MyFlags));
- Use instead of open,open-with-create-flag, close read and write
to get automatic error-messages (flag: MYF_WME) and only have
to test for != 0 if error (flag: MY_NABP).
int my_rename _A((const char *from,const char *to,myf MyFlags));
- Rename file
FILE *my_fopen _A((const char *FileName,int Flags,myf MyFlags));
FILE *my_fdopen _A((File Filedes,int Flags,myf MyFlags));
int my_fclose _A((FILE *fd,myf MyFlags));
uint my_fread _A((FILE *stream,byte *Buffer,uint Count,myf MyFlags));
uint my_fwrite _A((FILE *stream,const byte *Buffer,uint Count,
myf MyFlags));
ulong my_fseek _A((FILE *stream,ulong pos,int whence,myf MyFlags));
ulong my_ftell _A((FILE *stream,myf MyFlags));
- Same read-interface for streams as for files
gptr _mymalloc _A((uint uSize,const char *sFile,
uint uLine, myf MyFlag));
gptr _myrealloc _A((string pPtr,uint uSize,const char *sFile,
uint uLine, myf MyFlag));
void _myfree _A((gptr pPtr,const char *sFile,uint uLine));
int _sanity _A((const char *sFile,unsigned int uLine));
gptr _myget_copy_of_memory _A((const byte *from,uint length,
const char *sFile, uint uLine,
myf MyFlag));
- malloc(size,myflag) is mapped to this functions if not compiled
with -DSAFEMALLOC
void TERMINATE _A((void));
- Writes malloc-info on stdout if compiled with -DSAFEMALLOC.
int my_chsize _A((File fd,ulong newlength,myf MyFlags));
- Change size of file
void my_error _D((int nr,myf MyFlags, ...));
- Writes message using error number (se mysys/errors.h) on
stdout or curses if MYSYS_PROGRAM_USES_CURSES() is called.
void my_message _A((const char *str,myf MyFlags));
- Writes message-string on
stdout or curses if MYSYS_PROGRAM_USES_CURSES() is called.
void my_init _A((void ));
- Start each program (in main) with this.
void my_end _A((int infoflag));
- Gives info about program.
- If infoflag & MY_CHECK_ERROR prints if some files are left open
- If infoflag & MY_GIVE_INFO prints timing info and malloc info
about prog.
int my_redel _A((const char *from, const char *to, int MyFlags));
- Delete from before rename of to to from. Copyes state from old
file to new file. If MY_COPY_TIME is set sets old time.
int my_copystat _A((const char *from, const char *to, int MyFlags));
- Copye state from old file to new file.
If MY_COPY_TIME is set sets copy also time.
string my_filename _A((File fd));
- Give filename of open file.
int dirname _A((string to,const char *name));
- Copy name of directory from filename.
int test_if_hard_path _A((const char *dir_name));
- Test if dirname is a hard path (Starts from root)
void convert_dirname _A((string name));
- Convert dirname acording to system.
- In MSDOS changes all caracters to capitals and changes '/' to
'\'
string fn_ext _A((const char *name));
- Returns pointer to extension in filename
string fn_format _A((string to,const char *name,const char *dsk,
const char *form,int flag));
format a filename with replace of library and extension and
converts between different systems.
params to and name may be identicall
function dosn't change name if name != to
Flag may be: 1 force replace filnames library with 'dsk'
2 force replace extension with 'form' */
4 force Unpack filename (replace ~ with home)
8 Pack filename as short as possibly for output to
user.
All open requests should allways use at least:
"open(fn_format(temp_buffe,name,"","",4),...)" to unpack home and
convert filename to system-form.
string fn_same _A((string toname,const char *name,int flag));
- Copys directory and extension from name to toname if neaded.
copy can be forced by same flags that in fn_format.
int wild_compare _A((const char *str,const char *wildstr));
- Compare if str matches wildstr. Wildstr can contain "*" and "?"
as match-characters.
Returns 0 if match.
void get_date _A((string to,int timeflag));
- Get current date in a form ready for printing.
void soundex _A((string out_pntr, string in_pntr))
- Makes in_pntr to a 5 chars long string. All words that sounds
alike have the same string.
int init_key_cache _A((ulong use_mem,ulong leave_this_much_mem));
- Use cacheing of keys in MISAM, PISAM, and ISAM.
KEY_CACHE_SIZE is a good size.
- Remember to lock databases for optimal cacheing
void end_key_cache _A((void));
- End key-cacheing.
This diff is collapsed.
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
bin_PROGRAMS = benchmark noinst_PROGRAMS = benchmark
benchmark_SOURCES = benchmark.cpp benchmark_SOURCES = benchmark.cpp
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
benchmark_CXXFLAGS = -DYASSL_PURE_C benchmark_CXXFLAGS = -DYASSL_PURE_C
......
...@@ -3641,8 +3641,16 @@ sub mysqld_arguments ($$$$) { ...@@ -3641,8 +3641,16 @@ sub mysqld_arguments ($$$$) {
if ( $mysql_version_id >= 50036) if ( $mysql_version_id >= 50036)
{ {
# Prevent the started mysqld to access files outside of vardir # By default, prevent the started mysqld to access files outside of vardir
mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir); my $secure_file_dir= $opt_vardir;
if ( $opt_suite ne "main" )
{
# When running a suite other than default allow the mysqld
# access to subdirs of mysql-test/ in order to make it possible
# to "load data" from the suites data/ directory.
$secure_file_dir= $glob_mysql_test_dir;
}
mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $secure_file_dir);
} }
if ( $mysql_version_id >= 50000 ) if ( $mysql_version_id >= 50000 )
......
insert into mysql.help_category(help_category_id,name)values(1,'impossible_category_1'); insert into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @category1_id:= 1; select @category1_id:= 10001;
@category1_id:= 1 @category1_id:= 10001
1 10001
insert into mysql.help_category(help_category_id,name)values(2,'impossible_category_2'); insert into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @category2_id:= 2; select @category2_id:= 10002;
@category2_id:= 2 @category2_id:= 10002
2 10002
insert into mysql.help_category(help_category_id,name,parent_category_id)values(3,'impossible_category_3',@category2_id); insert into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id);
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @category3_id:= 3; select @category3_id:= 10003;
@category3_id:= 3 @category3_id:= 10003
3 10003
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(1,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @topic1_id:= 1; select @topic1_id:= 10101;
@topic1_id:= 1 @topic1_id:= 10101
1 10101
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(2,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @topic2_id:= 2; select @topic2_id:= 10102;
@topic2_id:= 2 @topic2_id:= 10102
2 10102
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(3,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @topic3_id:= 3; select @topic3_id:= 10103;
@topic3_id:= 3 @topic3_id:= 10103
3 10103
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(4,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @topic4_id:= 4; select @topic4_id:= 10104;
@topic4_id:= 4 @topic4_id:= 10104
4 10104
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(5,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7');
Warnings: Warnings:
Warning 1364 Field 'url' doesn't have a default value Warning 1364 Field 'url' doesn't have a default value
select @topic5_id:= 5; select @topic5_id:= 10105;
@topic5_id:= 5 @topic5_id:= 10105
5 10105
insert into mysql.help_keyword(help_keyword_id,name)values(1,'impossible_function_1'); insert into mysql.help_keyword(help_keyword_id,name)values(10201,'impossible_function_1');
select @keyword1_id:= 1; select @keyword1_id:= 10201;
@keyword1_id:= 1 @keyword1_id:= 10201
1 10201
insert into mysql.help_keyword(help_keyword_id,name)values(2,'impossible_function_5'); insert into mysql.help_keyword(help_keyword_id,name)values(10202,'impossible_function_5');
select @keyword2_id:= 2; select @keyword2_id:= 10202;
@keyword2_id:= 2 @keyword2_id:= 10202
2 10202
insert into mysql.help_keyword(help_keyword_id,name)values(3,'impossible_function_6'); insert into mysql.help_keyword(help_keyword_id,name)values(10203,'impossible_function_6');
select @keyword3_id:= 3; select @keyword3_id:= 10203;
@keyword3_id:= 3 @keyword3_id:= 10203
3 10203
insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword1_id,@topic2_id); insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword1_id,@topic2_id);
insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword2_id,@topic1_id); insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword2_id,@topic1_id);
insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword3_id,@topic3_id); insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword3_id,@topic3_id);
......
...@@ -13,30 +13,30 @@ ...@@ -13,30 +13,30 @@
# impossible_category_3 # impossible_category_3
# impossible_function_7 # impossible_function_7
insert into mysql.help_category(help_category_id,name)values(1,'impossible_category_1'); insert into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1');
select @category1_id:= 1; select @category1_id:= 10001;
insert into mysql.help_category(help_category_id,name)values(2,'impossible_category_2'); insert into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2');
select @category2_id:= 2; select @category2_id:= 10002;
insert into mysql.help_category(help_category_id,name,parent_category_id)values(3,'impossible_category_3',@category2_id); insert into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id);
select @category3_id:= 3; select @category3_id:= 10003;
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(1,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1');
select @topic1_id:= 1; select @topic1_id:= 10101;
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(2,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2');
select @topic2_id:= 2; select @topic2_id:= 10102;
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(3,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3');
select @topic3_id:= 3; select @topic3_id:= 10103;
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(4,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4');
select @topic4_id:= 4; select @topic4_id:= 10104;
insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(5,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7');
select @topic5_id:= 5; select @topic5_id:= 10105;
insert into mysql.help_keyword(help_keyword_id,name)values(1,'impossible_function_1'); insert into mysql.help_keyword(help_keyword_id,name)values(10201,'impossible_function_1');
select @keyword1_id:= 1; select @keyword1_id:= 10201;
insert into mysql.help_keyword(help_keyword_id,name)values(2,'impossible_function_5'); insert into mysql.help_keyword(help_keyword_id,name)values(10202,'impossible_function_5');
select @keyword2_id:= 2; select @keyword2_id:= 10202;
insert into mysql.help_keyword(help_keyword_id,name)values(3,'impossible_function_6'); insert into mysql.help_keyword(help_keyword_id,name)values(10203,'impossible_function_6');
select @keyword3_id:= 3; select @keyword3_id:= 10203;
insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword1_id,@topic2_id); insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword1_id,@topic2_id);
insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword2_id,@topic1_id); insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword2_id,@topic1_id);
......
...@@ -22,7 +22,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") ...@@ -22,7 +22,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
# Currently, USE_TLS crashes in Debug builds, so until that is fixed Debug # Currently, USE_TLS crashes in Debug builds, so until that is fixed Debug
# .dlls cannot be loaded at runtime. # .dlls cannot be loaded at runtime.
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_TLS") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_TLS")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DUSE_TLS")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DUSE_TLS") SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DUSE_TLS")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DUSE_TLS")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys ) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys )
ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c
......
#!@PERL@
# Copyright (C) 2003 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# fill_func_tables - parse ../Docs/manual.texi
#
# Original version by Victor Vagin <vva@mysql.com>
#
my $cat_name= "";
my $func_name= "";
my $text= "";
my $example= "";
local $mode= "";
sub prepare_name
{
my ($a)= @_;
$a =~ s/(\@itemize \@bullet)/ /g;
$a =~ s/(\@end itemize)/ /g;
$a =~ s/(\@end multitable)/ /g;
$a =~ s/(\@end table)/ /g;
$a =~ s/(\@cindex(.*?)\n)/ /g;
$a =~ s/(\@multitable \@columnfractions(.*?)\n)/ /g;
$a =~ s/(\@node(.*?)\n)/ /g;
$a =~ s/(\@tab)/\t/g;
$a =~ s/\@item/ /g;
$a =~ s/\@code\{((.|\n)+?)\}/$1/go;
$a =~ s/\@strong\{(.+?)\}/$1/go;
$a =~ s/\@samp\{(.+?)\}/$1/go;
$a =~ s/\@emph\{((.|\n)+?)\}/\/$1\//go;
$a =~ s/\@xref\{((.|\n)+?)\}/See also : [$1]/go;
$a =~ s/\@ref\{((.|\n)+?)\}/[$1]/go;
$a =~ s/\'/\'\'/g;
$a =~ s/\\/\\\\/g;
$a =~ s/\`/\`\`/g;
$a =~ s/\@table \@code/ /g;
$a =~ s/\(\)//g;
$a =~ s/((\w|\s)+)\(([\+-=><\/%*!<>\s]+)\)/$3/gxs; #$a =~ s/((\w|\s)+)\(([\+-=><\/%*!<>\s]+)\)/$3 $1/gxs;
$a =~ s/([\+-=><\/%*!<>\s]+)\(((\w|\s)+)\)/$1/gxs;#$a =~ s/([\+-=><\/%*!<>\s]+)\(((\w|\s)+)\)/$1 $2/gxs;
$a =~ s/((\w|\s)+)\((.+)\)/$1/gxs;
return $a;
}
sub prepare_text
{
my ($a)= @_;
$a =~ s/(\@itemize \@bullet)/ /g;
$a =~ s/(\@end itemize)/ /g;
$a =~ s/(\@end multitable)/ /g;
$a =~ s/(\@end table)/ /g;
$a =~ s/(\@cindex(.*?)\n)/ /g;
$a =~ s/(\@multitable \@columnfractions(.*?)\n)/ /g;
$a =~ s/(\@node(.*?)\n)/ /g;
$a =~ s/(\@tab)/\t/g;
$a =~ s/\@itemx/ /g;
$a =~ s/\@item/ /g;
$a =~ s/\@code\{((.|\n)+?)\}/$1/go;
$a =~ s/\@strong\{(.+?)\}/$1/go;
$a =~ s/\@samp\{(.+?)\}/$1/go;
$a =~ s/\@emph\{((.|\n)+?)\}/\/$1\//go;
$a =~ s/\@xref\{((.|\n)+?)\}/See also : [$1]/go;
$a =~ s/\@ref\{((.|\n)+?)\}/[$1]/go;
$a =~ s/\'/\'\'/g;
$a =~ s/\\/\\\\/g;
$a =~ s/\`/\`\`/g;
$a =~ s/(\n*?)$//g;
$a =~ s/\n/\\n/g;
$a =~ s/\@table \@code/ /g;
return $a;
}
sub prepare_example
{
my ($a)= @_;
$a =~ s/\'/\'\'/g;
$a =~ s/\\/\\\\/g;
$a =~ s/\`/\`\`/g;
$a =~ s/(\n*?)$//g;
$a =~ s/\n/\\n/g;
return $a;
}
sub flush_all
{
my ($mode) = @_;
if ($mode eq ""){return;}
$func_name= prepare_name($func_name);
$text= prepare_text($text);
$example= prepare_example($example);
if ($func_name ne "" && $text ne "" && !($func_name =~ /[abcdefghikjlmnopqrstuvwxyz]/)){
print "INSERT INTO function (name,description,example) VALUES (";
print "'$func_name',";
print "'$text',";
print "'$example'";
print ");\n";
print "INSERT INTO function_category (cat_id,func_id) VALUES (\@cur_category,LAST_INSERT_ID());\n";
}
$func_name= "";
$text= "";
$example= "";
$mode= "";
}
sub new_category
{
my ($category)= @_;
$category= prepare_text($category);
print "INSERT INTO function_category_name (name) VALUES (\'$category\');\n";
print "SELECT \@cur_category:=LAST_INSERT_ID();\n";
}
print "INSERT INTO db (Host,DB,User,Select_priv) VALUES ('%','mysql_help','','Y');\n";
print "CREATE DATABASE mysql_help;\n";
print "USE mysql_help;\n";
print "DROP TABLE IF EXISTS function;\n";
print "CREATE TABLE function (";
print " func_id int unsigned not null auto_increment,";
print " name char(64) not null,";
print " url char(128) not null,";
print " description text not null,";
print " example text not null,";
print " min_args tinyint not null,";
print " max_args tinyint,";
print " date_created datetime not null,";
print " last_modified timestamp not null,";
print " primary key (func_id)";
print ") type=myisam;\n\n";
print "DROP TABLE IF EXISTS function_category_name;\n";
print "CREATE TABLE function_category_name (";
print " cat_id smallint unsigned not null auto_increment,";
print " name char(64) not null,";
print " url char(128) not null,";
print " date_created datetime not null,";
print " last_modified timestamp not null,";
print " primary key (cat_id)";
print ") type=myisam;\n\n";
print "DROP TABLE IF EXISTS function_category;\n";
print "CREATE TABLE function_category (";
print " cat_id smallint unsigned not null references function_category_name,";
print " func_id int unsigned not null references function,";
print " primary key (cat_id, func_id)";
print ") type=myisam;\n\n";
print "DELETE FROM function_category_name;\n";
print "DELETE FROM function_category;\n";
print "DELETE FROM function;\n";
print "SELECT \@cur_category:=null;\n\n";
my $in_section_6_3= 0;
for(<>)
{
if ($_=~/\@section Functions for Use in \@code{SELECT} and \@code{WHERE} Clauses/ &&
!$in_section_6_3){
$in_section_6_3= 1;
next;
}
if ($_=~/\@section/ && $in_section_6_3){
$in_section_6_3= 0;
next;
}
if (!$in_section_6_3) { next; }
my $c_name= "";
($c_name)=m|\@c for_mysql_help,(.+?)$|;
if (!($c_name eq "") && ! ($c_name =~ m/$cat_name/i)){
($cat_name)= $c_name;
new_category($cat_name);
next;
}
($c_name)=m|\@subsubsection (.+?)$|;
if (!($c_name eq "") && ! ($c_name =~ m/$cat_name/i)){
($cat_name)= $c_name;
new_category($cat_name);
next;
}
($c_name)=m|\@subsection (.+?)$|;
if (!($c_name eq "") && ! ($c_name =~ m/$cat_name/i)){
($cat_name)= $c_name;
new_category($cat_name);
next;
}
($f_name)=m|\@findex (.+?)$|;
if (!($f_name eq "")){
flush_all($mode);
($func_name)= ($f_name);
$mode= "text";
next;
}
if ($_=~/\@example/ && ($mode eq "text")){
$mode= "example";
next;
}
if ($_=~/\@end example/ && ($mode eq "example")){
flush_all($mode);
next;
}
if ($mode eq "text") { $text .= $_; }
if ($mode eq "example") { $example .= $_; }
}
print "DELETE function_category_name ";
print "FROM function_category_name ";
print "LEFT JOIN function_category ON function_category.cat_id=function_category_name.cat_id ";
print "WHERE function_category.cat_id is null;"
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment