4.1: sql/sql_cache.cc needs #include <ctype.h>

4.1: sql/sql_cache.cc needs #include <ctype.h>

am 16.01.2003 20:10:04 von Paul DuBois

On Jaguar, sql/sql_cache.cc compilation fails:

if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/var/mysql/40100\""
-DDATADIR="\"/var/mysql/40100/data\""
-DSHAREDIR="\"/var/mysql/40100/share/mysql\"" -DHAVE_CONFIG_H -I. -I.
-I.. -I../innobase/include -I../include -I../regex -I.
-I/usr/local/ssl/include -O3 -DDBUG_OFF -fno-implicit-templates
-fno-exceptions -fno-rtti -traditional-cpp -DHAVE_DARWIN_THREADS
-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ
-DFN_NO_CASE_SENCE -MT sql_cache.o -MD -MP -MF ".deps/sql_cache.Tpo" \
-c -o sql_cache.o `test -f 'sql_cache.cc' || echo './'`sql_cache.cc; \
then mv ".deps/sql_cache.Tpo" ".deps/sql_cache.Po"; \
else rm -f ".deps/sql_cache.Tpo"; exit 1; \
fi
sql_cache.cc: In member function `uint8 Query_cache::is_cacheable(THD*,
unsigned int, char*, LEX*, TABLE_LIST*)':
sql_cache.cc:2482: `tolower' undeclared (first use this function)
sql_cache.cc:2482: (Each undeclared identifier is reported only once for each
function it appears in.)
make: *** [sql_cache.o] Error 1


This error goes away if is included. So sql_cache.cc
needs to include that file, or include some other file that includes
.


How-To-Repeat: configure and build 4.1 on Jaguar

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13498@lists.mysql.com
To unsubscribe, e-mail

Re: 4.1: sql/sql_cache.cc needs #include <ctype.h>

am 17.01.2003 12:31:24 von Sinisa Milivojevic

Paul DuBois writes:
> On Jaguar, sql/sql_cache.cc compilation fails:
>
> if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/var/mysql/40100\""
> -DDATADIR="\"/var/mysql/40100/data\""
> -DSHAREDIR="\"/var/mysql/40100/share/mysql\"" -DHAVE_CONFIG_H -I. -I.
> -I.. -I../innobase/include -I../include -I../regex -I.
> -I/usr/local/ssl/include -O3 -DDBUG_OFF -fno-implicit-templates
> -fno-exceptions -fno-rtti -traditional-cpp -DHAVE_DARWIN_THREADS
> -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ
> -DFN_NO_CASE_SENCE -MT sql_cache.o -MD -MP -MF ".deps/sql_cache.Tpo" \
> -c -o sql_cache.o `test -f 'sql_cache.cc' || echo './'`sql_cache.cc; \
> then mv ".deps/sql_cache.Tpo" ".deps/sql_cache.Po"; \
> else rm -f ".deps/sql_cache.Tpo"; exit 1; \
> fi
> sql_cache.cc: In member function `uint8 Query_cache::is_cacheable(THD*,
> unsigned int, char*, LEX*, TABLE_LIST*)':
> sql_cache.cc:2482: `tolower' undeclared (first use this function)
> sql_cache.cc:2482: (Each undeclared identifier is reported only once for each
> function it appears in.)
> make: *** [sql_cache.o] Error 1
>
>
> This error goes away if is included. So sql_cache.cc
> needs to include that file, or include some other file that includes
> .
>
>
> How-To-Repeat: configure and build 4.1 on Jaguar

Thank you for the bug report.

No need to include ctype, but these lines :

#ifdef FN_NO_CASE_SENCE
#define DB_NAME_PREPROCESS(C) tolower(C)
#else
#define DB_NAME_PREPROCESS(C) (C)
#endif

have to be changed into :


#ifdef FN_NO_CASE_SENCE
#define DB_NAME_PREPROCESS(C) my_tolower(C)
#else
#define DB_NAME_PREPROCESS(C) (C)
#endif

Which we shall fix ASAP.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13509@lists.mysql.com
To unsubscribe, e-mail

Re: 4.1: sql/sql_cache.cc needs #include <ctype.h>

am 17.01.2003 16:33:45 von Sanja Byelkin

Hi!

On Thu, Jan 16, 2003 at 01:10:04PM -0600, Paul DuBois wrote:
> On Jaguar, sql/sql_cache.cc compilation fails:
>
> if g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/var/mysql/40100\""
> -DDATADIR="\"/var/mysql/40100/data\""
> -DSHAREDIR="\"/var/mysql/40100/share/mysql\"" -DHAVE_CONFIG_H -I. -I.
> -I.. -I../innobase/include -I../include -I../regex -I.
> -I/usr/local/ssl/include -O3 -DDBUG_OFF -fno-implicit-templates
> -fno-exceptions -fno-rtti -traditional-cpp -DHAVE_DARWIN_THREADS
> -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ
> -DFN_NO_CASE_SENCE -MT sql_cache.o -MD -MP -MF ".deps/sql_cache.Tpo" \
> -c -o sql_cache.o `test -f 'sql_cache.cc' || echo './'`sql_cache.cc; \
> then mv ".deps/sql_cache.Tpo" ".deps/sql_cache.Po"; \
> else rm -f ".deps/sql_cache.Tpo"; exit 1; \
> fi
> sql_cache.cc: In member function `uint8 Query_cache::is_cacheable(THD*,
> unsigned int, char*, LEX*, TABLE_LIST*)':
> sql_cache.cc:2482: `tolower' undeclared (first use this function)
> sql_cache.cc:2482: (Each undeclared identifier is reported only once for
> each
> function it appears in.)
> make: *** [sql_cache.o] Error 1
>
>
> This error goes away if is included. So sql_cache.cc
> needs to include that file, or include some other file that includes
> .

Thank you for bugreport. here is patch to fix this bug.

[skip]

diff -Nrc a/sql/sql_cache.cc b/sql/sql_cache.cc
*** a/sql/sql_cache.cc Fri Jan 17 17:30:23 2003
--- b/sql/sql_cache.cc Fri Jan 17 17:30:23 2003
***************
*** 357,368 ****
#define DUMP(C)
#endif

- #ifdef FN_NO_CASE_SENCE
- #define DB_NAME_PREPROCESS(C) tolower(C)
- #else
- #define DB_NAME_PREPROCESS(C) (C)
- #endif
-
const char *query_cache_type_names[]= { "OFF", "ON", "DEMAND",NullS };
TYPELIB query_cache_type_typelib=
{
--- 357,362 ----
***************
*** 2478,2489 ****

if (tables_used->table->db_type == DB_TYPE_MRG_ISAM ||
tables_used->table->tmp_table != NO_TMP_TABLE ||
! (tables_used->db_length == 5 &&
! DB_NAME_PREPROCESS(tables_used->db[0])=='m' &&
! DB_NAME_PREPROCESS(tables_used->db[1])=='y' &&
! DB_NAME_PREPROCESS(tables_used->db[2])=='s' &&
! DB_NAME_PREPROCESS(tables_used->db[3])=='q' &&
! DB_NAME_PREPROCESS(tables_used->db[4])=='l'))
{
DBUG_PRINT("qcache",
("select not cacheable: used MRG_ISAM, temporary or system table(s)"));
--- 2472,2489 ----

if (tables_used->table->db_type == DB_TYPE_MRG_ISAM ||
tables_used->table->tmp_table != NO_TMP_TABLE ||
! (tables_used->db_length == 5 &&
! #ifdef FN_NO_CASE_SENCE
! // TODO: latin1 charset should be replaced with system charset
! my_strncasecmp(my_charset_latin1,tables_used->db,"mysql",5) == 0
! #else
! tables_used->db[0]=='m' &&
! tables_used->db[1]=='y' &&
! tables_used->db[2]=='s' &&
! tables_used->db[3]=='q' &&
! tables_used->db[4]=='l'
! #endif
! ))
{
DBUG_PRINT("qcache",
("select not cacheable: used MRG_ISAM, temporary or system table(s)"));


--
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Oleksandr Byelkin
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Lugansk, Ukraine
<___/ www.mysql.com

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13512@lists.mysql.com
To unsubscribe, e-mail