gen_lex_hash.cc values adjusted

parent dc854359
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
#
# This library 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
# Library General Public License for more details.
#
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
......@@ -45,7 +45,7 @@ my_config.h: ../config.h
# This should be changed in the source and removed.
my_global.h: global.h
-$(RM) my_global.h
-$(CHMOD) u+w my_global.h
$(CP) global.h my_global.h
# These files should not be included in distributions since they are
......
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult 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; either version 2 of the License, or
(at your option) any later version.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
......@@ -116,7 +116,7 @@ static void make_prime_array(uint start)
uint max_index=(uint) sqrt((double) max_allowed_array);
bzero((char*) primes,sizeof(primes[0])*max_allowed_array);
i=2;
while (i < max_index)
{
......@@ -124,7 +124,7 @@ static void make_prime_array(uint start)
primes[j]=1;
while (primes[++i]) ;
}
to=primes;
for (i=start ; i <= max_allowed_array ; i++)
if (!primes[i])
......@@ -451,7 +451,7 @@ static void make_max_length_table(void)
{
unique_length[(uchar) symbols[i].name[0]]=length;
unique_length[(uchar) tolower(symbols[i].name[0])]=length;
}
}
}
for (i=0 ; i < sizeof(sql_functions)/sizeof(SYMBOL) ; i++)
{
......@@ -470,9 +470,9 @@ int main(int argc,char **argv)
struct rand_struct rand_st;
static uint best_mod,best_add,best_functype;
int error;
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))
exit(1);
......@@ -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",
start_value, best_t1, best_t2,best_type,
best_mod, best_add, best_functype);
printf("inline SYMBOL *get_hash_symbol(const char *s,unsigned int length,bool function)\n\
{\n\
ulong idx = %lu+char_table[(uchar) *s];\n\
......
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