Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6a52c421
Commit
6a52c421
authored
Aug 31, 2000
by
serg@infomag.ape.relarn.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gen_lex_hash.cc values adjusted
parent
dc854359
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
include/Makefile.am
include/Makefile.am
+4
-4
sql/gen_lex_hash.cc
sql/gen_lex_hash.cc
+9
-9
No files found.
include/Makefile.am
View file @
6a52c421
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
#
# This library is free software; you can redistribute it and/or
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# version 2 of the License, or (at your option) any later version.
#
#
# This library is distributed in the hope that it will be useful,
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
# Library General Public License for more details.
#
#
# You should have received a copy of the GNU Library General Public
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
...
@@ -45,7 +45,7 @@ my_config.h: ../config.h
...
@@ -45,7 +45,7 @@ my_config.h: ../config.h
# This should be changed in the source and removed.
# This should be changed in the source and removed.
my_global.h
:
global.h
my_global.h
:
global.h
-
$(
RM)
my_global.h
-
$(
CHMOD)
u+w
my_global.h
$(CP)
global.h my_global.h
$(CP)
global.h my_global.h
# These files should not be included in distributions since they are
# These files should not be included in distributions since they are
...
...
sql/gen_lex_hash.cc
View file @
6a52c421
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
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
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...
@@ -116,7 +116,7 @@ static void make_prime_array(uint start)
...
@@ -116,7 +116,7 @@ static void make_prime_array(uint start)
uint
max_index
=
(
uint
)
sqrt
((
double
)
max_allowed_array
);
uint
max_index
=
(
uint
)
sqrt
((
double
)
max_allowed_array
);
bzero
((
char
*
)
primes
,
sizeof
(
primes
[
0
])
*
max_allowed_array
);
bzero
((
char
*
)
primes
,
sizeof
(
primes
[
0
])
*
max_allowed_array
);
i
=
2
;
i
=
2
;
while
(
i
<
max_index
)
while
(
i
<
max_index
)
{
{
...
@@ -124,7 +124,7 @@ static void make_prime_array(uint start)
...
@@ -124,7 +124,7 @@ static void make_prime_array(uint start)
primes
[
j
]
=
1
;
primes
[
j
]
=
1
;
while
(
primes
[
++
i
])
;
while
(
primes
[
++
i
])
;
}
}
to
=
primes
;
to
=
primes
;
for
(
i
=
start
;
i
<=
max_allowed_array
;
i
++
)
for
(
i
=
start
;
i
<=
max_allowed_array
;
i
++
)
if
(
!
primes
[
i
])
if
(
!
primes
[
i
])
...
@@ -451,7 +451,7 @@ static void make_max_length_table(void)
...
@@ -451,7 +451,7 @@ static void make_max_length_table(void)
{
{
unique_length
[(
uchar
)
symbols
[
i
].
name
[
0
]]
=
length
;
unique_length
[(
uchar
)
symbols
[
i
].
name
[
0
]]
=
length
;
unique_length
[(
uchar
)
tolower
(
symbols
[
i
].
name
[
0
])]
=
length
;
unique_length
[(
uchar
)
tolower
(
symbols
[
i
].
name
[
0
])]
=
length
;
}
}
}
}
for
(
i
=
0
;
i
<
sizeof
(
sql_functions
)
/
sizeof
(
SYMBOL
)
;
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
sql_functions
)
/
sizeof
(
SYMBOL
)
;
i
++
)
{
{
...
@@ -470,9 +470,9 @@ int main(int argc,char **argv)
...
@@ -470,9 +470,9 @@ int main(int argc,char **argv)
struct
rand_struct
rand_st
;
struct
rand_struct
rand_st
;
static
uint
best_mod
,
best_add
,
best_functype
;
static
uint
best_mod
,
best_add
,
best_functype
;
int
error
;
int
error
;
MY_INIT
(
argv
[
0
]);
MY_INIT
(
argv
[
0
]);
start_value
=
6059524L
;
best_t1
=
2194873L
;
best_t2
=
4441039L
;
best_type
=
4
;
/* mode=4159 add=8
func_type: 0 */
start_value
=
7223692L
;
best_t1
=
2365832L
;
best_t2
=
1560117L
;
best_type
=
0
;
/* mode=4519 add=5
func_type: 0 */
if
(
get_options
(
argc
,(
char
**
)
argv
))
if
(
get_options
(
argc
,(
char
**
)
argv
))
exit
(
1
);
exit
(
1
);
...
@@ -540,7 +540,7 @@ printf("/* This code is generated by gen_lex_hash.cc that seeks for a perfect\nh
...
@@ -540,7 +540,7 @@ printf("/* This code is generated by gen_lex_hash.cc that seeks for a perfect\nh
printf
(
"/* start_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; */ /* mode=%d add=%d type: %d */
\n\n
"
,
printf
(
"/* start_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; */ /* mode=%d add=%d type: %d */
\n\n
"
,
start_value
,
best_t1
,
best_t2
,
best_type
,
start_value
,
best_t1
,
best_t2
,
best_type
,
best_mod
,
best_add
,
best_functype
);
best_mod
,
best_add
,
best_functype
);
printf
(
"inline SYMBOL *get_hash_symbol(const char *s,unsigned int length,bool function)
\n
\
printf
(
"inline SYMBOL *get_hash_symbol(const char *s,unsigned int length,bool function)
\n
\
{
\n
\
{
\n
\
ulong idx = %lu+char_table[(uchar) *s];
\n
\
ulong idx = %lu+char_table[(uchar) *s];
\n
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment