public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* bug
@ 1998-08-31 13:07 Brian Grossman
1998-09-01 20:17 ` bug Alexandre Oliva
0 siblings, 1 reply; 26+ messages in thread
From: Brian Grossman @ 1998-08-31 13:07 UTC (permalink / raw)
To: egcs-bugs
On hppa1.0-hp-hpux10.20, I get an internal compiler error when
compiling sql_yacc.cc from mysql-3.21.33. -O and -O2 produce they
error. -O0 does not. This is with egcs-1.0.3a.
On egcs-1.0.1, compiling the same sql_yacc.cc complained about out of memory.
The message says
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local\"" -DDATADIR="\"/usr/local/var\"" -DSHAREDIR="\"/usr/local/share/mysql\"" -DHAVE_CONFIG_H -I../mit-pthreads/include -I./../include -I./../regex -I. -I../include -I.. -I. -O -O2 -fno-implicit-templates -DDBUG_OFF -c sql_yacc.cc
/my/gnu/lib/bison/bison.simple: In function `int yyparse()':
/my/gnu/lib/bison/bison.simple:692: Internal compiler error.
/my/gnu/lib/bison/bison.simple:692: Please submit a full bug report to `egcs-bugs@cygnus.com'.
Brian
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug
1998-08-31 13:07 bug Brian Grossman
@ 1998-09-01 20:17 ` Alexandre Oliva
1998-09-08 16:10 ` bug (9/26) Brian Grossman
` (22 more replies)
0 siblings, 23 replies; 26+ messages in thread
From: Alexandre Oliva @ 1998-09-01 20:17 UTC (permalink / raw)
To: Brian Grossman; +Cc: egcs-bugs
Brian Grossman <briang@gomer.fc.hp.com> writes:
> On hppa1.0-hp-hpux10.20, I get an internal compiler error when
> compiling sql_yacc.cc from mysql-3.21.33. -O and -O2 produce they
> error. -O0 does not. This is with egcs-1.0.3a.
Will you please repeat the failed compilation with the additional
flags -save-temps and -v, then send us the .ii file it produces along
with the command line and compiler output?
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (8/26)
1998-09-01 20:17 ` bug Alexandre Oliva
1998-09-08 16:10 ` bug (9/26) Brian Grossman
@ 1998-09-08 16:10 ` Brian Grossman
1998-09-08 17:52 ` bug (4/26) Brian Grossman
` (20 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 16:10 UTC (permalink / raw)
To: Alexandre Oliva
typedef unsigned int sig_atomic_t;
struct sigaction {
union {
void (*__sa_sigaction)(int, siginfo_t *, void *);
void (*__sa_handler)(int );
} __handler;
sigset_t sa_mask;
int sa_flags;
};
struct timespec {
time_t tv_sec;
long tv_nsec;
};
typedef struct timespec timestruc_t;
struct sigstack {
void *ss_sp;
int ss_onstack;
};
struct sigvec {
void (*sv_handler)(int );
int sv_mask;
int sv_flags;
};
extern "C" {
extern void (*signal(int, void (*) (int )))(int );
extern int raise(int);
extern int kill(pid_t, int);
extern int sigemptyset(sigset_t *);
extern int sigfillset(sigset_t *);
extern int sigaddset(sigset_t *, int);
extern int sigdelset(sigset_t *, int);
extern int sigismember(const sigset_t *, int);
extern int sigaction(int, const struct sigaction *, struct sigaction *);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int sigsuspend(const sigset_t *);
extern int sigpending(sigset_t *);
# 174 "/usr/include/sys/signal.h" 3
extern int sigwaitinfo(const sigset_t *set, siginfo_t *info);
extern int sigtimedwait(const sigset_t *set, siginfo_t * info,
const struct timespec *timeout);
extern int sigqueue(pid_t pid, int signo,
const union sigval value);
extern void (*bsd_signal(int, void(*)(int)))(int);
extern int killpg(pid_t, int);
extern int sigstack(struct sigstack *, struct sigstack *);
extern int sigaltstack(const stack_t *, stack_t *);
extern int siginterrupt(int, int);
extern void (*sigset(int, void (*)(int )))(int );
extern int sighold(int);
extern int sigrelse(int);
extern int sigignore(int);
extern int sigpause(int);
extern long sigblock(long);
extern long sigsetmask(long);
extern int sigvector(int, const struct sigvec *, struct sigvec *);
extern int (*ssignal(int, int (*) (int )))(int );
extern ssize_t sigspace(size_t);
extern int gsignal(int);
# 253 "/usr/include/sys/signal.h" 3
}
# 1 "/usr/include/sys/syscall.h" 1 3
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (9/26)
1998-09-01 20:17 ` bug Alexandre Oliva
@ 1998-09-08 16:10 ` Brian Grossman
1998-09-08 16:10 ` bug (8/26) Brian Grossman
` (21 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 16:10 UTC (permalink / raw)
To: Alexandre Oliva
# 1004 "/usr/include/sys/syscall.h" 3
# 478 "/usr/include/sys/signal.h" 2 3
# 1 "/usr/include/machine/frame.h" 1 3
typedef struct frame_marker {
int fm_edp;
int fm_esr4;
int fm_erp;
int fm_crp;
int fm_sl;
int fm_clup;
int fm_ep;
int fm_psp;
} frame_marker_t;
# 479 "/usr/include/sys/signal.h" 2 3
struct siglocal_misc {
int sm_syscall;
int sm_onstack;
int sm_omask;
char sm_syscall_action;
char sm_eosys;
unsigned short sm_error;
int sm_rval1;
int sm_rval2;
int sm_arg[4 ];
};
struct siglocal {
struct siglocal_misc sl_misc;
save_state_t sl_ss;
};
struct siglocalx {
struct siglocal_misc sl_misc;
ucontext_t sl_uc;
siginfo_t sl_si;
};
struct __xsi {
struct __sub_ctxt sc;
int __padding;
siginfo_t si;
};
struct sigcontext {
union {
struct siglocal sl;
struct siglocalx sx;
} sc_ctxt;
int sc_args[4 ];
struct frame_marker sc_sfm;
};
# 676 "/usr/include/sys/signal.h" 3
# 31 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/vmmac.h" 1 3
# 32 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/ucontext.h" 1 3
extern int getcontext(ucontext_t *);
extern int setcontext(const ucontext_t *);
extern int swapcontext(ucontext_t *,const ucontext_t *);
extern void makecontext(ucontext_t *, void (*)(), int, ...);
# 34 "/usr/include/sys/user.h" 2 3
typedef enum __pofile_flags {
UF_EXCLOSE = 0x1,
UF_MAPPED = 0x2,
UF_FDLOCK = 0x4,
UF_INUSE = 0x8
} pofile_flags_t;
extern int maxfiles;
extern int maxfiles_lim;
typedef enum user_eosys {
EOSYS_NOTSYSCALL = 0,
EOSYS_NORMAL = 1,
EOSYS_INTERRUPTED = 2,
EOSYS_RESTART = 3,
EOSYS_NORESTART = 4,
RESTARTSYS = EOSYS_INTERRUPTED
} user_eosys_t;
typedef enum user_sstep {
ULINK = 0x01f,
USSTEP = 0x020,
UPCQM = 0x040,
UBL = 0x080,
UBE = 0x100
} user_sstep_t;
typedef struct {
long sigset[2 ];
} ksigset_t;
typedef struct user {
struct pcb u_pcb;
struct proc *u_procp;
struct kthread *u_kthreadp;
save_state_t *u_sstatep;
save_state_t *u_pfaultssp;
int u_arg[10];
int *u_ap;
label_t u_qsave;
u_short u_spare_short;
u_short u_error;
union {
struct {
int R_val1;
int R_val2;
} u_rv;
off32_t r_off32;
off32_t r_off64[2];
time_t r_time;
} u_r;
user_eosys_t u_eosys;
u_short u_syscall;
struct audit_filename *u_audpath;
struct audit_string *u_audstr;
struct audit_sock *u_audsock;
char *u_audxparam;
label_t u_ssave;
tlabel_t u_psave;
time_t u_outime;
ksigset_t u_sigonstack;
ksigset_t u_oldmask;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (4/26)
1998-09-01 20:17 ` bug Alexandre Oliva
1998-09-08 16:10 ` bug (9/26) Brian Grossman
1998-09-08 16:10 ` bug (8/26) Brian Grossman
@ 1998-09-08 17:52 ` Brian Grossman
1998-09-08 17:52 ` bug (2/26) Brian Grossman
` (19 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 17:52 UTC (permalink / raw)
To: Alexandre Oliva
# 292 "/usr/include/limits.h" 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/param.h" 1 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/machine/param.h" 1 3
# 1 "/usr/include/sys/sysmacros.h" 1 3
# 14 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/machine/param.h" 2 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/machine/param_shm.h" 1 3
# 15 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/machine/param.h" 2 3
# 26 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/param.h" 2 3
# 1 "../mit-pthreads/include/sys/time.h" 1
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
};
struct timeval {
unsigned long tv_sec;
long tv_usec;
};
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
extern "C" {
extern double difftime(time_t, time_t);
extern time_t mktime(struct tm *);
extern time_t time(time_t *);
extern char *ctime(const time_t *);
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern size_t strftime(char *, size_t, const char *, const struct tm *);
# 105 "../mit-pthreads/include/sys/time.h"
extern clock_t clock(void);
extern void tzset(void);
extern char *tzname[2];
extern char *strptime(const char *, const char *, struct tm *);
extern long timezone;
extern int daylight;
extern struct tm *getdate(const char *);
extern char *nl_asctime(struct tm *, char *, int);
extern char *nl_ctime(long *, char *, int);
extern char *nl_ascxtime(struct tm *, char *);
extern char *nl_cxtime(long *, char *);
extern int getitimer(int, struct itimerval *);
extern int setitimer(int, const struct itimerval *, struct itimerval *);
extern int gettimeofday(struct timeval *, struct timezone *);
extern int settimeofday(const struct timeval *, const struct timezone *);
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
extern int stime(const time_t *);
# 166 "../mit-pthreads/include/sys/time.h"
extern int getdate_err;
}
struct ki_timeval {
long tv_sec;
long tv_nunit;
};
# 27 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/param.h" 2 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/machine/spl.h" 1 3
# 293 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/machine/spl.h" 3
# 28 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/param.h" 2 3
# 143 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/param.h" 3
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (5/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (5 preceding siblings ...)
1998-09-08 17:52 ` bug (1/26) Brian Grossman
@ 1998-09-08 17:52 ` Brian Grossman
1998-09-08 17:52 ` bug (12/26) Brian Grossman
` (15 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 17:52 UTC (permalink / raw)
To: Alexandre Oliva
# 453 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/param.h" 3
# 313 "/usr/include/limits.h" 2 3
# 116 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/limits.h" 2 3
# 7 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/syslimits.h" 2 3
# 11 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/limits.h" 2 3
# 85 "../include/global.h" 2
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/float.h" 1 3
# 88 "../include/global.h" 2
# 1 "/usr/include/fcntl.h" 1 3
# 1 "/usr/include/sys/fcntl.h" 1 3
# 1 "/usr/include/sys/_flock_body.h" 1 3
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
# 149 "/usr/include/sys/fcntl.h" 2 3
# 181 "/usr/include/sys/fcntl.h" 3
extern "C" {
extern int fcntl(int, int, ...);
extern int creat(const char *, mode_t);
extern int open(const char *, int, ...);
# 208 "/usr/include/sys/fcntl.h" 3
# 218 "/usr/include/sys/fcntl.h" 3
}
# 243 "/usr/include/sys/fcntl.h" 3
# 9 "/usr/include/fcntl.h" 2 3
# 95 "../include/global.h" 2
# 1 "/usr/include/sys/timeb.h" 1 3
struct timeb {
time_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
extern "C" {
extern int ftime(struct timeb *);
}
# 98 "../include/global.h" 2
# 1 "../mit-pthreads/include/time.h" 1
# 1 "../mit-pthreads/include/sys/__time.h" 1
# 46 "../mit-pthreads/include/time.h" 2
# 66 "../mit-pthreads/include/time.h"
extern "C" {
char * asctime (const struct tm *) ;
double difftime (time_t, time_t) ;
char * ctime (const time_t *) ;
struct tm * gmtime (const time_t *) ;
struct tm * localtime (const time_t *) ;
char * asctime_r (const struct tm *, char *) ;
char * ctime_r (const time_t *, char *) ;
struct tm * gmtime_r (const time_t *, struct tm *) ;
struct tm * localtime_r (const time_t *, struct tm *) ;
time_t mktime (struct tm *) ;
time_t time (time_t *) ;
extern char *tzname[2];
void tzset (void) ;
void tzsetwall (void) ;
};
# 102 "../include/global.h" 2
# 1 "../mit-pthreads/include/unistd.h" 1
# 1 "../mit-pthreads/include/sys/__unistd.h" 1
# 1 "/usr/include/utime.h" 1 3
extern "C" {
struct utimbuf {
time_t actime;
time_t modtime;
};
extern int utime(const char *, const struct utimbuf *);
}
# 9 "../mit-pthreads/include/sys/__unistd.h" 2
# 40 "../mit-pthreads/include/unistd.h" 2
extern "C" {
void _exit (int) ;
int access (const char *, int) ;
int chdir (const char *) ;
int chown (const char *, uid_t, gid_t) ;
int close (int) ;
int dup (int) ;
int dup2 (int, int) ;
int execve (const char *, char * const *, char * const *) ;
pid_t fork (void) ;
int isatty (int) ;
int link (const char *, const char *) ;
off_t lseek (int, off_t, int) ;
int pipe (int *) ;
ssize_t read (int, void *, size_t) ;
unsigned sleep (unsigned) ;
char *ttyname (int) ;
int unlink (const char *) ;
ssize_t write (int, const void *, size_t) ;
unsigned alarm (unsigned) ;
char *cuserid (char *) ;
int execl (const char *, const char *, ...) ;
int execle (const char *, const char *, ...) ;
int execlp (const char *, const char *, ...) ;
int execv (const char *, char * const *) ;
int execvp (const char *, char * const *) ;
long fpathconf (int, int) ;
char *getcwd (char *, size_t) ;
gid_t getegid (void) ;
uid_t geteuid (void) ;
gid_t getgid (void) ;
int getgroups (int, gid_t *) ;
char *getlogin (void) ;
pid_t getpgrp (void) ;
pid_t getpid (void) ;
pid_t getppid (void) ;
uid_t getuid (void) ;
long pathconf (const char *, int) ;
int pause (void) ;
int rmdir (const char *) ;
int setgid (gid_t) ;
int setpgid (pid_t, pid_t) ;
pid_t setsid (void) ;
int setuid (uid_t) ;
long sysconf (int) ;
pid_t tcgetpgrp (int) ;
int tcsetpgrp (int, pid_t) ;
int acct (const char *) ;
int async_daemon (void) ;
char *brk (const char *) ;
int chroot (const char *) ;
char *crypt (const char *, const char *) ;
int des_cipher (const char *, char *, long, int) ;
void des_setkey (const char *key) ;
void encrypt (char *, int) ;
void endusershell (void) ;
int exect (const char *, char * const *, char * const *) ;
int fchdir (int) ;
int fchown (int, uid_t, gid_t) ;
int fsync (int) ;
int ftruncate (int, off_t) ;
int getdtablesize (void) ;
long gethostid (void) ;
int gethostname (char *, int) ;
mode_t getmode (const void *, mode_t) ;
int getpagesize (void) ;
char *getpass (const char *) ;
char *getusershell (void) ;
char *getwd (char *) ;
int initgroups (const char *, gid_t) ;
int mknod (const char *, mode_t, dev_t) ;
int mkstemp (char *) ;
char *mktemp (char *) ;
int nfssvc (int) ;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (6/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (3 preceding siblings ...)
1998-09-08 17:52 ` bug (2/26) Brian Grossman
@ 1998-09-08 17:52 ` Brian Grossman
1998-09-08 17:52 ` bug (1/26) Brian Grossman
` (17 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 17:52 UTC (permalink / raw)
To: Alexandre Oliva
int nice (int) ;
void psignal (unsigned, const char *) ;
int profil (char *, int, int, int) ;
int rcmd (char **, int, const char *,
const char *, const char *, int *) ;
char *re_comp (const char *) ;
int re_exec (const char *) ;
int readlink (const char *, char *, int) ;
int reboot (int) ;
int revoke (const char *) ;
int rresvport (int *) ;
int ruserok (const char *, int, const char *, const char *) ;
char *sbrk (int) ;
int setegid (gid_t) ;
int seteuid (uid_t) ;
int setgroups (int, const gid_t *) ;
void sethostid (long) ;
int sethostname (const char *, int) ;
void setkey (const char *) ;
int setlogin (const char *) ;
void *setmode (const char *) ;
int setpgrp (pid_t pid, pid_t pgrp) ;
int setregid (int, int) ;
int setreuid (int, int) ;
int setrgid (gid_t) ;
int setruid (uid_t) ;
void setusershell (void) ;
int swapon (const char *) ;
int symlink (const char *, const char *) ;
void sync (void) ;
int syscall (int, ...) ;
int truncate (const char *, off_t) ;
int ttyslot (void) ;
unsigned ualarm (unsigned, unsigned) ;
void usleep (unsigned) ;
int vfork (void) ;
};
# 111 "../include/global.h" 2
# 1 "/usr/include/alloca.h" 1 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 1 3
# 327 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 3
# 6 "/usr/include/alloca.h" 2 3
extern "C" {
extern void *__builtin_alloca(size_t);
}
# 114 "../include/global.h" 2
# 1 "/usr/include/sys/stream.h" 1 3
# 1 "../mit-pthreads/include/sys/uio.h" 1
struct iovec {
void *iov_base;
size_t iov_len;
};
extern "C" {
int readv (int, const struct iovec *, int) ;
int writev (int, const struct iovec *, int) ;
};
# 21 "/usr/include/sys/stream.h" 2 3
# 1 "/usr/include/sys/user.h" 1 3
# 25 "/usr/include/sys/user.h" 3
# 1 "/usr/include/machine/pcb.h" 1 3
typedef struct pcb {
int pcb_r1;
int pcb_r2;
int pcb_r3;
int pcb_r4;
int pcb_r5;
int pcb_r6;
int pcb_r7;
int pcb_r8;
int pcb_r9;
int pcb_r10;
int pcb_r11;
int pcb_r12;
int pcb_r13;
int pcb_r14;
int pcb_r15;
int pcb_r16;
int pcb_r17;
int pcb_r18;
int pcb_r19;
int pcb_r20;
int pcb_r21;
int pcb_r22;
int pcb_r23;
int pcb_r24;
int pcb_r25;
int pcb_r26;
int pcb_r27;
int pcb_r28;
int pcb_r29;
int pcb_r30;
int pcb_r31;
int pcb_sr0;
int pcb_sr1;
int pcb_sr2;
int pcb_sr3;
int pcb_sr4;
int pcb_sr5;
int pcb_sr6;
int pcb_sr7;
int pcb_cr0;
int pcb_cr8;
int pcb_cr9;
int pcb_cr10;
int pcb_cr11;
int pcb_cr12;
int pcb_cr13;
int pcb_cr14;
int pcb_cr15;
int pcb_cr16;
int pcb_cr17;
int pcb_cr18;
int pcb_cr19;
int pcb_cr20;
int pcb_cr21;
int pcb_cr22;
int pcb_cr23;
int pcb_cr24;
int pcb_cr25;
int pcb_cr26;
int pcb_cr27;
int pcb_cr28;
int pcb_cr29;
int pcb_cr30;
int pcb_cr31;
int pcb_pc;
int pcb_psw;
int pcb_ipsw;
int pcb_pcsqe;
int pcb_pcoqe;
int pcb_ksp;
double pcb_fr0;
double pcb_fr1;
double pcb_fr2;
double pcb_fr3;
double pcb_fr4;
double pcb_fr5;
double pcb_fr6;
double pcb_fr7;
double pcb_fr8;
double pcb_fr9;
double pcb_fr10;
double pcb_fr11;
double pcb_fr12;
double pcb_fr13;
double pcb_fr14;
double pcb_fr15;
double pcb_fr16;
double pcb_fr17;
double pcb_fr18;
double pcb_fr19;
double pcb_fr20;
double pcb_fr21;
double pcb_fr22;
double pcb_fr23;
double pcb_fr24;
double pcb_fr25;
double pcb_fr26;
double pcb_fr27;
double pcb_fr28;
double pcb_fr29;
double pcb_fr30;
double pcb_fr31;
int pcb_mdhi;
int pcb_mdlo;
int pcb_mdov;
int *pcb_sswap;
struct vfd *pcb_p0br;
int pcb_p0lr;
struct vfd *pcb_p1br;
int pcb_p1lr;
struct vfd *pcb_p2br;
int pcb_p2lr;
int pcb_sigc[3];
int pcb_pad;
int pcb_escapecode;
struct C__trystuff *pcb_trychain;
} pcb_t;
# 26 "/usr/include/sys/user.h" 2 3
# 1 "../mit-pthreads/include/errno.h" 1
# 1 "/usr/include/sys/errno.h" 1 3
extern "C" {
extern int errno;
}
# 206 "/usr/include/sys/errno.h" 3
# 41 "../mit-pthreads/include/errno.h" 2
extern "C" {
extern int * __error();
};
# 28 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/vmparam.h" 1 3
# 1 "/usr/include/machine/vmparam.h" 1 3
extern space_t bufcache_spaceid;
# 68 "/usr/include/machine/vmparam.h" 3
# 147 "/usr/include/machine/vmparam.h" 3
typedef struct tlabel {
void (*t_dopc)();
space_t t_pcsq;
caddr_t t_pcoq;
space_t t_isr;
caddr_t t_ior;
unsigned int t_type;
space_t t_okspace;
caddr_t t_okoffset;
unsigned int t_oklen;
} tlabel_t;
# 15 "/usr/include/sys/vmparam.h" 2 3
# 29 "/usr/include/sys/user.h" 2 3
# 1 "/usr/include/sys/signal.h" 1 3
# 1 "/usr/include/sys/sigevent.h" 1 3
typedef union sigval {
int __sival_int;
void * __sival_ptr;
} sigval_t;
typedef struct sigevent {
int __sigev_notify;
int __sigev_signo;
sigval_t __sigev_value;
} sigevent_t;
enum __sigev_types {
SIGEV_NONE = 1,
SIGEV_SIGNAL
};
# 15 "/usr/include/sys/signal.h" 2 3
# 1 "/usr/include/sys/siginfo.h" 1 3
enum __si_codes {
SI_QUEUE = -2,
SI_USER = -1,
SI_TIMER = 1,
SI_ASYNCIO= 2,
SI_MESGQ = 3
};
typedef struct __siginfo {
int si_signo;
int si_code;
int si_errno;
sigval_t si_value;
union {
struct {
pid_t __pid;
union {
struct {
uid_t __uid;
} __kill;
struct {
int __status;
} __SIGCLD;
} __pdata;
} __proc;
struct {
void *__addr;
} __fault;
struct {
int __fd;
long __band;
} __file;
} __data;
int __pad[10 ];
} siginfo_t;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (12/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (6 preceding siblings ...)
1998-09-08 17:52 ` bug (5/26) Brian Grossman
@ 1998-09-08 17:52 ` Brian Grossman
1998-09-08 19:36 ` bug (3/26) Brian Grossman
` (14 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 17:52 UTC (permalink / raw)
To: Alexandre Oliva
extern char *longlong2str(longlong val,char *dst,int radix);
extern longlong strtoll(const char *str, char **ptr, int base);
extern ulonglong strtoull(const char *str, char **ptr, int base);
}
# 17 "mysql_priv.h" 2
# 1 "../include/mysql_version.h" 1
# 18 "mysql_priv.h" 2
# 1 "../mit-pthreads/include/signal.h" 1
# 1 "../mit-pthreads/include/sys/__signal.h" 1
static inline int sig_any(sigset_t *sig) {
int i;
for (i=0; i < sizeof(sigset_t)/sizeof(long) ; i++)
if (sig->sigset[i] != 0)
return 1;
return 0;
}
# 41 "../mit-pthreads/include/signal.h" 2
extern "C" {
int raise (int) ;
int sigfillset (sigset_t *) ;
int sigemptyset (sigset_t *) ;
int sigaddset (sigset_t *, int) ;
int sigdelset (sigset_t *, int) ;
int sigismember (const sigset_t *, int) ;
int sigsuspend (const sigset_t *) ;
int sigprocmask (int, const sigset_t *, sigset_t *) ;
int kill (pid_t, int) ;
int sigaction (int, const struct sigaction *, struct sigaction *) ;
int sigpending (sigset_t *) ;
int killpg (pid_t, int) ;
int siginterrupt (int, int) ;
void psignal (unsigned int, const char *) ;
};
# 19 "mysql_priv.h" 2
# 1 "../include/thr_lock.h" 1
extern "C" {
# 1 "../include/my_pthread.h" 1
# 1 "../mit-pthreads/include/pthread.h" 1
# 1 "../mit-pthreads/include/pthread/version.h" 1
# 48 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/machdep.h" 1
# 1 "/usr/include/setjmp.h" 1 3
extern "C" {
typedef double jmp_buf[50 /2];
extern int setjmp(jmp_buf);
extern void longjmp(jmp_buf, int);
typedef double sigjmp_buf[50 /2];
extern int sigsetjmp(sigjmp_buf, int);
extern void siglongjmp(sigjmp_buf, int);
extern int _setjmp(jmp_buf);
extern void _longjmp(jmp_buf, int);
}
# 7 "../mit-pthreads/include/pthread/machdep.h" 2
# 26 "../mit-pthreads/include/pthread/machdep.h"
# 36 "../mit-pthreads/include/pthread/machdep.h"
# 61 "../mit-pthreads/include/pthread/machdep.h"
typedef char semaphore[31];
struct machdep_pthread {
void *(*start_routine)(void *);
void *start_argument;
void *machdep_stack;
struct itimerval machdep_timer;
jmp_buf machdep_state;
};
extern "C" {
# 141 "../mit-pthreads/include/pthread/machdep.h"
};
# 49 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/cleanup.h" 1
struct pthread_cleanup {
struct pthread_cleanup *next;
void (*routine)();
void *routine_arg;
};
extern "C" {
int pthread_cleanup_push (void (*routine)(void *), void *routine_arg) ;
void pthread_cleanup_pop (int execute) ;
};
# 50 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/kernel.h" 1
# 71 "../mit-pthreads/include/pthread/kernel.h"
# 51 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/prio_queue.h" 1
struct pthread_prio_level {
struct pthread * first;
struct pthread * last;
};
struct pthread_prio_queue {
void * data;
struct pthread * next;
struct pthread_prio_level level[126 + 1];
};
extern "C" {
void pthread_prio_queue_init (struct pthread_prio_queue *) ;
void pthread_prio_queue_enq (struct pthread_prio_queue *,
struct pthread *) ;
struct pthread *pthread_prio_queue_deq
(struct pthread_prio_queue *) ;
};
# 52 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/queue.h" 1
struct pthread_queue {
struct pthread *q_next;
struct pthread *q_last;
void *q_data;
};
extern "C" {
void pthread_queue_init (struct pthread_queue *) ;
void pthread_queue_enq (struct pthread_queue *, struct pthread *) ;
int pthread_queue_remove (struct pthread_queue *, struct pthread *) ;
struct pthread *pthread_queue_get (struct pthread_queue *) ;
struct pthread *pthread_queue_deq (struct pthread_queue *) ;
};
# 53 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/sleep.h" 1
# 63 "../mit-pthreads/include/pthread/sleep.h"
# 54 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/mutex.h" 1
enum pthread_mutextype {
MUTEX_TYPE_STATIC_FAST = 0,
MUTEX_TYPE_FAST = 1,
MUTEX_TYPE_COUNTING_FAST = 2,
MUTEX_TYPE_METERED = 3,
MUTEX_TYPE_DEBUG = 4,
MUTEX_TYPE_MAX
};
union pthread_mutex_data {
void * m_ptr;
int m_count;
};
typedef struct pthread_mutex {
enum pthread_mutextype m_type;
struct pthread_queue m_queue;
struct pthread * m_owner;
semaphore m_lock;
union pthread_mutex_data m_data;
long m_flags;
} pthread_mutex_t;
typedef struct pthread_mutexattr {
enum pthread_mutextype m_type;
long m_flags;
} pthread_mutexattr_t;
extern "C" {
int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *) ;
int pthread_mutex_lock (pthread_mutex_t *) ;
int pthread_mutex_unlock (pthread_mutex_t *) ;
int pthread_mutex_trylock (pthread_mutex_t *) ;
int pthread_mutex_destroy (pthread_mutex_t *) ;
};
# 55 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/cond.h" 1
# 1 "../mit-pthreads/include/timers.h" 1
# 1 "../mit-pthreads/include/sys/timers.h" 1
extern "C" {
};
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (2/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (2 preceding siblings ...)
1998-09-08 17:52 ` bug (4/26) Brian Grossman
@ 1998-09-08 17:52 ` Brian Grossman
1998-09-08 17:52 ` bug (6/26) Brian Grossman
` (18 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 17:52 UTC (permalink / raw)
To: Alexandre Oliva
# 1 "../mit-pthreads/include/sys/cdefs.h" 1
# 1 "/usr/include/sys/_inttypes.h" 1 3
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef int intfast_t;
typedef unsigned int uintfast_t;
# 71 "/usr/include/sys/_inttypes.h" 3
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef char int_least8_t;
typedef unsigned char uint_least8_t;
typedef int int_fast8_t;
typedef unsigned int uint_fast8_t;
typedef short int_least16_t;
typedef unsigned short uint_least16_t;
typedef int int_fast16_t;
typedef unsigned int uint_fast16_t;
typedef int int_least32_t;
typedef unsigned int uint_least32_t;
typedef int int_fast32_t;
typedef unsigned int uint_fast32_t;
# 139 "/usr/include/sys/_inttypes.h" 3
typedef uint32_t ptr32_t;
# 13 "../mit-pthreads/include/sys/cdefs.h" 2
# 32 "../mit-pthreads/include/sys/cdefs.h"
typedef unsigned int u_int32_t;
typedef unsigned short u_int16_t;
# 44 "../mit-pthreads/include/stdio.h" 2
# 1 "../mit-pthreads/include/pthread/types.h" 1
# 1 "../mit-pthreads/include/pthread/xtypes.h" 1
# 4 "../mit-pthreads/include/pthread/types.h" 2
# 1 "../mit-pthreads/include/pthread/ac-types.h" 1
# 5 "../mit-pthreads/include/pthread/types.h" 2
# 28 "../mit-pthreads/include/pthread/types.h"
# 45 "../mit-pthreads/include/stdio.h" 2
# 1 "../mit-pthreads/include/pthread/posix.h" 1
# 46 "../mit-pthreads/include/stdio.h" 2
# 1 "../mit-pthreads/include/sys/__stdio.h" 1
typedef unsigned int size_t;
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/types.h" 1 3
# 1 "/usr/include/sys/stdsyms.h" 1 3
# 61 "/usr/include/sys/stdsyms.h" 3
# 83 "/usr/include/sys/stdsyms.h" 3
# 219 "/usr/include/sys/stdsyms.h" 3
# 229 "/usr/include/sys/stdsyms.h" 3
# 252 "/usr/include/sys/stdsyms.h" 3
# 11 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/types.h" 2 3
typedef int32_t dev_t;
typedef uint32_t ino_t;
typedef uint16_t mode_t;
typedef uint16_t nlink_t;
typedef int32_t fpos32_t;
typedef int32_t fpos_t;
typedef uint32_t fsblkcnt32_t;
typedef uint32_t fsblkcnt_t;
typedef int32_t off32_t;
typedef int32_t off_t;
typedef uint32_t fsfilcnt32_t;
typedef uint32_t fsfilcnt_t;
typedef int32_t blkcnt32_t;
typedef int32_t blkcnt_t;
typedef int32_t pid_t;
typedef int32_t lwpid_t;
typedef int32_t gid_t;
typedef int32_t uid_t;
typedef int32_t tid_t;
typedef int32_t ssize_t;
typedef uint16_t __site_t;
typedef uint16_t __cnode_t;
typedef int32_t time_t;
typedef uint32_t clock_t;
typedef int32_t key_t;
typedef unsigned short __ushort;
typedef int32_t __daddr_t;
typedef char *__caddr_t;
typedef int32_t __swblk_t;
typedef __caddr_t caddr_t;
typedef int32_t id_t;
typedef uint32_t useconds_t;
typedef uint32_t rlim32_t;
typedef uint32_t rlim_t;
typedef __site_t site_t;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned int uint;
typedef unsigned short ushort;
typedef unsigned char ubit8;
typedef unsigned short ubit16;
typedef uint32_t ubit32;
typedef char sbit8;
typedef short sbit16;
typedef int32_t sbit32;
typedef __swblk_t swblk_t;
typedef __daddr_t daddr_t;
typedef __cnode_t cnode_t;
typedef uintptr_t physaddr_t;
typedef unsigned long paddr_t;
typedef intptr_t page_t;
typedef unsigned long ulong_t;
typedef int16_t cnt_t;
typedef uint32_t space_t;
typedef uint32_t prot_t;
typedef uint32_t cdno_t;
typedef uint16_t use_t;
typedef struct _physadr { intptr_t r[1]; } *physadr;
typedef struct _quad { long val[2]; } quad;
typedef int spu_t;
typedef short cpu_t;
typedef struct label_t {
int32_t lbl_rp;
int32_t lbl_sp;
int32_t lbl_s[17];
int32_t lbl_ss[1];
double lbl_sf[4];
} label_t;
typedef char *dm_message;
typedef int32_t aid_t;
typedef pid_t sid_t;
typedef int32_t fd_mask;
typedef struct fd_set {
fd_mask fds_bits[((( 2048 )+(( (sizeof(fd_mask) * 8) )-1))/( (sizeof(fd_mask) * 8) )) ];
} fd_set;
extern "C" {
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (1/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (4 preceding siblings ...)
1998-09-08 17:52 ` bug (6/26) Brian Grossman
@ 1998-09-08 17:52 ` Brian Grossman
1998-09-08 19:36 ` Alexandre Oliva
1998-09-08 17:52 ` bug (5/26) Brian Grossman
` (16 subsequent siblings)
22 siblings, 1 reply; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 17:52 UTC (permalink / raw)
To: Alexandre Oliva
Sender: oliva@tiete.dcc.unicamp.br
Resent-Sender: oliva@tiete.dcc.unicamp.br
Resent-To: egcs-bugs@cygnus.com
Resent-From: Alexandre Oliva <oliva@dcc.unicamp.br>
Resent-Date: 08 Sep 1998 17:38:59 -0300
X-From-Line: briang@gomer.fc.hp.com Wed Sep 2 13:41 EST 1998
Received: from grande.dcc.unicamp.br (grande.dcc.unicamp.br [143.106.7.8])
by amazonas.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id NAA04583
for <oliva@amazonas.dcc.unicamp.br>; Wed, 2 Sep 1998 13:41:13 -0300 (EST)
Received: from hpfcla.fc.hp.com (hpfcla.fc.hp.com [15.254.48.2])
by grande.dcc.unicamp.br (8.8.5/8.8.5) with ESMTP id NAA24175
for <oliva@dcc.unicamp.br>; Wed, 2 Sep 1998 13:31:59 -0300 (EST)
Received: from gomer.fc.hp.com (root@gomer.fc.hp.com [15.1.47.200]) by hpfcla.fc.hp.com with ESMTP (8.8.6 (PHNE_14041)/8.7.1) id KAA04302 for <oliva@dcc.unicamp.br>; Wed, 2 Sep 1998 10:33:02 -0600 (MDT)
Received: from gomer.fc.hp.com (briang@gomer.fc.hp.com [15.1.47.200]) by gomer.fc.hp.com with ESMTP (8.7.6/8.7.1) id KAA13074 for <oliva@dcc.unicamp.br>; Wed, 2 Sep 1998 10:24:13 -0600 (MDT)
Message-Id: <199809021624.KAA13074@gomer.fc.hp.com>
X-Mailer: exmh version 2.0.2 2/24/98
To: Alexandre Oliva <oliva@dcc.unicamp.br>
Subject: Re: bug
In-reply-to: Your message of "02 Sep 1998 00:12:04 MDT."
< orlno3mcmz.fsf@tiete.dcc.unicamp.br >
Date: Wed, 02 Sep 1998 10:24:13 -0600
From: Brian Grossman <briang@gomer.fc.hp.com>
X-Content-Length: 497305
Lines: 25523
MIME-Version: 1.0
X-Emacs: 20.4 "Emerald" XEmacs Lucid with mule
Content-Type: text/plain; charset=US-ASCII
This is a multipart MIME message.
--==_Exmh_-1474766440
Content-Type: text/plain; charset=us-ascii
> > On hppa1.0-hp-hpux10.20, I get an internal compiler error when
> > compiling sql_yacc.cc from mysql-3.21.33. -O and -O2 produce they
> > error. -O0 does not. This is with egcs-1.0.3a.
>
> Will you please repeat the failed compilation with the additional
> flags -save-temps and -v, then send us the .ii file it produces along
> with the command line and compiler output?
Here's the command line:
g++ -save-temps -v -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/opt/mysql\"" -DDATADIR="\"/var/opt/mysql\"" -DSHAREDIR="\"/opt/mysql/share/mysql\"" -DHAVE_CONFIG_H -I../mit-pthreads/include -I./../include -I./../regex -I. -I../include -I.. -I. -O2 -fno-implicit-templates -DDBUG_OFF -c sql_yacc.cc
When the process died: Total RSS/VSS :181.1mb/ 93.7mb
Compiler output and sql_yacc.ii are attached.
Brian
--==_Exmh_-1474766440
Content-Type: text/plain ; name="sql_yacc.ii"; charset=us-ascii
Content-Description: sql_yacc.ii
Content-Disposition: attachment; filename="sql_yacc.ii"
# 1 "sql_yacc.cc"
# 16 "sql_yacc.yy"
# 1 "mysql_priv.h" 1
# 1 "../include/global.h" 1
# 1 "../config.h" 1
# 13 "../include/global.h" 2
# 1 "../mit-pthreads/include/stdio.h" 1
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (1/26)
1998-09-08 17:52 ` bug (1/26) Brian Grossman
@ 1998-09-08 19:36 ` Alexandre Oliva
0 siblings, 0 replies; 26+ messages in thread
From: Alexandre Oliva @ 1998-09-08 19:36 UTC (permalink / raw)
To: egcs-bugs
Sorry about the split message. I've resent it to the list, upon Brian
Grossman's request, but my mail software managed to split it in 64Kb
pieces :-(
I hope it is useful for anyone, anyway. It was not for me, because I
could not reproduce the reported bug in the platforms I've got access
to; it seems to be specific to HP/UX.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (10/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (9 preceding siblings ...)
1998-09-08 19:36 ` bug (14/26) Brian Grossman
@ 1998-09-08 19:36 ` Brian Grossman
1998-09-08 20:53 ` bug (13/26) Brian Grossman
` (11 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 19:36 UTC (permalink / raw)
To: Alexandre Oliva
int u_code;
struct {
void *uss_alternatesp;
unsigned int uss_size;
unsigned int uss_enabled:1;
unsigned int uss_inuse:1;
} u_signalstack;
struct squ_s {
struct sqe_s * squ_next;
struct sqe_s * squ_prev;
unsigned long squ_flags;
} u_strsqh;
char u_segflg;
caddr_t u_base;
unsigned int u_count;
stack_t u_curstack;
ucontext_t *u_prevcontext;
dev_t u_devsused;
user_sstep_t u_sstep;
unsigned u_pcsq_head;
unsigned u_pcoq_head;
unsigned u_pcsq_tail;
unsigned u_pcoq_tail;
union {
struct {
uint32_t u_ipsw[2];
int32_t u_gr1[2];
int32_t u_gr2[2];
} u_64;
struct {
uint32_t u_ipsw_hi;
uint32_t u_ipsw_lo;
int32_t u_gr1_hi;
int32_t u_gr1_lo;
int32_t u_gr2_hi;
int32_t u_gr2_lo;
} u_32;
} u_wide;
struct uprof {
short *pr_base;
unsigned pr_size;
unsigned pr_off;
unsigned pr_scale;
} u_prof;
u_int u_kpreemptcnt;
struct ki_timeval u_syscall_time;
struct ki_timeval u_accumin;
dev_t u_dev_t;
void *u_threadid;
u_int u_ki_site;
u_int u_ktc_flag;
int u_swtchd_for_sema;
caddr_t *u_ki_clk_tos_ptr;
caddr_t u_ki_clk_stack[20 ];
int *send_term_ptr;
int u_debug:1,
u_debug2:1,
u_debug3:1,
u_debug4:1,
u_debug5:1,
u_debug6:1,
u_debug7:1,
u_debug_spare:24;
union {
double s_dummy;
int s_stack[1];
} u_s;
} user_t;
struct ucred {
uid_t cr_uid;
gid_t cr_gid;
gid_t cr_groups[20 ];
uid_t cr_ruid;
gid_t cr_rgid;
int cr_ref;
unsigned long cr_pag;
};
# 358 "/usr/include/sys/user.h" 3
# 39 "/usr/include/sys/stream.h" 2 3
extern "C" {
# 106 "/usr/include/sys/stream.h" 3
typedef unsigned long ulong;
typedef struct ucred cred_t;
struct streamtab {
struct qinit * st_rdinit;
struct qinit * st_wrinit;
struct qinit * st_muxrinit;
struct qinit * st_muxwinit;
};
struct msgb {
struct msgb * b_next;
struct msgb * b_prev;
struct msgb * b_cont;
unsigned char * b_rptr;
unsigned char * b_wptr;
struct datab * b_datap;
unsigned char b_band;
unsigned char b_pad1;
unsigned short b_flag;
char * b_pad_osr;
};
typedef struct msgb mblk_t;
typedef struct msgb * MBLKP;
typedef struct msgb ** MBLKPP;
struct datab {
unsigned char * db_base;
unsigned char * db_lim;
unsigned char db_ref;
unsigned char db_type;
short db_flag;
unsigned int db_size;
unsigned int db_quad[4];
};
typedef struct datab dblk_t;
typedef struct free_rtn {
void (*free_func)(char *);
char * free_arg;
} frtn_t;
struct queue {
struct qinit * q_qinfo;
struct msgb * q_first;
struct msgb * q_last;
struct queue * q_next;
struct queue * q_link;
void * q_ptr;
ulong q_count;
ulong q_flag;
long q_minpsz;
long q_maxpsz;
ulong q_hiwat;
ulong q_lowat;
struct qband * q_bandp;
unsigned char q_nband;
unsigned char q_pad1[3];
struct queue * q_other;
};
typedef struct queue queue_t;
struct qband {
struct qband * qb_next;
ulong qb_count;
struct msgb * qb_first;
struct msgb * qb_last;
ulong qb_hiwat;
ulong qb_lowat;
ulong qb_flag;
long qb_pad1;
};
typedef struct qband qband_t;
# 285 "/usr/include/sys/stream.h" 3
typedef int (*stropen_V3)(queue_t *, dev_t, int, int);
typedef int (*strclose_V3)(queue_t *);
typedef int (*stropen_V4)(queue_t *, dev_t *, int, int, cred_t *);
typedef int (*strclose_V4)(queue_t *, int, cred_t *);
struct qinit {
int (*qi_putp)(queue_t *, mblk_t *);
int (*qi_srvp)(queue_t *);
int (*qi_qopen)();
int (*qi_qclose)();
int (*qi_qadmin)(void);
struct module_info * qi_minfo;
struct module_stat * qi_mstat;
};
struct module_info {
unsigned short mi_idnum;
char * mi_idname;
long mi_minpsz;
long mi_maxpsz;
ulong mi_hiwat;
ulong mi_lowat;
};
struct linkblk {
queue_t * l_qtop;
queue_t * l_qbot;
int l_index;
long l_pad[5];
};
typedef union {
long l;
ulong ul;
caddr_t cp;
mblk_t * mp;
} ioc_pad;
struct iocblk {
int ioc_cmd;
cred_t * ioc_cr;
uint ioc_id;
ioc_pad ioc_cnt;
int ioc_error;
int ioc_rval;
long ioc_filler[4];
};
struct copyreq {
int cq_cmd;
cred_t * cq_cr;
uint cq_id;
ioc_pad cq_ad;
uint cq_size;
int cq_flag;
mblk_t * cq_private;
long cq_filler[4];
};
struct copyresp {
int cp_cmd;
cred_t * cp_cr;
uint cp_id;
ioc_pad cp_rv;
uint cp_pad1;
int cp_pad2;
mblk_t * cp_private;
long cp_filler[4];
};
struct stroptions {
ulong so_flags;
short so_readopt;
ushort so_wroff;
long so_minpsz;
long so_maxpsz;
ulong so_hiwat;
ulong so_lowat;
unsigned char so_band;
};
# 590 "/usr/include/sys/stream.h" 3
# 607 "/usr/include/sys/stream.h" 3
typedef struct str_config {
uint sc_version;
uint sc_sa_flags;
char sc_sa_name[8 +1];
dev_t sc_devnum;
} str_config_t;
struct streamadm {
uint sa_version;
uint sa_flags;
char sa_name[8 +1];
caddr_t sa_ttys;
uint sa_sync_level;
caddr_t sa_sync_info;
};
typedef enum qfields {
QHIWAT = 0,
QLOWAT = 1,
QMAXPSZ = 2,
QMINPSZ = 3,
QCOUNT = 4,
QFIRST = 5,
QLAST = 6,
QFLAG = 7,
QBAD = 8
} qfields_t;
# 695 "/usr/include/sys/stream.h" 3
# 1173 "/usr/include/sys/stream.h" 3
}
# 1197 "/usr/include/sys/stream.h" 3
# 119 "../include/global.h" 2
# 1 "../include/dbug.h" 1
extern "C" {
# 48 "../include/dbug.h"
}
# 213 "../include/global.h" 2
typedef int File;
typedef int Socket;
typedef void sig_handler;
typedef void (*sig_return)();
typedef char pchar;
typedef char puchar;
typedef char pbool;
typedef short pshort;
typedef float pfloat;
typedef int (*qsort_cmp)(const void *,const void *);
typedef int size_socket;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (3/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (7 preceding siblings ...)
1998-09-08 17:52 ` bug (12/26) Brian Grossman
@ 1998-09-08 19:36 ` Brian Grossman
1998-09-08 19:36 ` bug (14/26) Brian Grossman
` (13 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 19:36 UTC (permalink / raw)
To: Alexandre Oliva
}
# 530 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/types.h" 3
# 548 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/sys/types.h" 3
# 7 "../mit-pthreads/include/sys/__stdio.h" 2
# 47 "../mit-pthreads/include/stdio.h" 2
struct __sbuf {
unsigned char *_base;
int _size;
};
typedef struct __sFILE {
unsigned char *_p;
int _r;
int _w;
short _flags;
short _file;
struct __sbuf _bf;
int _lbfsize;
struct __sbuf _ub;
unsigned char *_up;
int _ur;
unsigned char _ubuf[3];
unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize;
int _offset;
} FILE;
extern "C" {
extern FILE __sF[];
};
extern "C" {
void clearerr (FILE *) ;
int fclose (FILE *) ;
int feof (FILE *) ;
int ferror (FILE *) ;
int fflush (FILE *) ;
int fgetc (FILE *) ;
int fgetpos (FILE *, fpos_t *) ;
char * fgets (char *, size_t, FILE *) ;
FILE * fopen (const char *, const char *) ;
int fprintf (FILE *, const char *, ...) ;
int fputc (int, FILE *) ;
int fputs (const char *, FILE *) ;
size_t fread (void *, size_t, size_t, FILE *) ;
FILE * freopen (const char *, const char *, FILE *) ;
int fscanf (FILE *, const char *, ...) ;
int fseek (FILE *, long, int) ;
int fsetpos (FILE *, const fpos_t *) ;
long ftell (const FILE *) ;
size_t fwrite (const void *, size_t, size_t, FILE *) ;
int getc (FILE *) ;
int getchar (void) ;
char * gets (char *) ;
extern int sys_nerr;
extern const char *const sys_errlist[];
void perror (const char *) ;
int printf (const char *, ...) ;
int putc (int, FILE *) ;
int putchar (int) ;
int puts (const char *) ;
int remove (const char *) ;
int rename (const char *, const char *) ;
void rewind (FILE *) ;
int scanf (const char *, ...) ;
void setbuf (FILE *, char *) ;
int setvbuf (FILE *, char *, int, size_t) ;
int sprintf (char *, const char *, ...) ;
int sscanf (const char *, const char *, ...) ;
FILE * tmpfile (void) ;
char * tmpnam (char *) ;
int ungetc (int, FILE *) ;
int vfprintf (FILE *, const char *, void * ) ;
int vprintf (const char *, void * ) ;
int vsprintf (char *, const char *, void * ) ;
char *mprintf (const char *, ...) ;
char *vmprintf (const char *, void * ) ;
};
extern "C" {
char * ctermid (char *) ;
char * cuserid (char *) ;
FILE * fdopen (int, const char *) ;
int fileno (FILE *) ;
};
extern "C" {
void flockfile (FILE *) ;
void funlockfile (FILE *) ;
int ftrylockfile (FILE *) ;
};
extern "C" {
char *fgetline (FILE *, size_t *) ;
int fpurge (FILE *) ;
int getw (FILE *) ;
int pclose (FILE *) ;
FILE *popen (const char *, const char *) ;
int putw (int, FILE *) ;
void setbuffer (FILE *, char *, int) ;
int setlinebuf (FILE *) ;
char *tempnam (const char *, const char *) ;
int snprintf (char *, size_t, const char *, ...) ;
int vsnprintf (char *, size_t, const char *, void * ) ;
int vscanf (const char *, void * ) ;
int vsscanf (const char *, const char *, void * ) ;
};
extern "C" {
FILE *funopen (const void *,
int (*)(void *, char *, int),
int (*)(void *, const char *, int),
fpos_t (*)(void *, fpos_t, int),
int (*)(void *)) ;
};
extern "C" {
int __srget (FILE *) ;
int __svfscanf (FILE *, const char *, void * ) ;
int __swbuf (int, FILE *) ;
};
extern "C" {
int __getc (FILE *) ;
};
# 345 "../mit-pthreads/include/stdio.h"
extern "C" {
int __sputc (int, FILE *) ;
};
extern "C" {
int __putc (int, FILE *) ;
};
# 74 "../include/global.h" 2
# 1 "../mit-pthreads/include/stdlib.h" 1
# 1 "../mit-pthreads/include/sys/__stdlib.h" 1
typedef unsigned int wchar_t;
# 46 "../mit-pthreads/include/stdlib.h" 2
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long quot;
long rem;
} ldiv_t;
extern "C" {
double atof (const char *) ;
int atoi (const char *) ;
long atol (const char *) ;
double strtod (const char *, char **) ;
long strtol (const char *, char **, int) ;
unsigned long strtoul (const char *, char **, int) ;
int rand (void) ;
void srand (unsigned int) ;
long random (void) ;
void srandom (unsigned int) ;
char * initstate (unsigned int, char *, int) ;
char * setstate (char *) ;
void * malloc (size_t) ;
void * realloc (void *, size_t) ;
void * calloc (size_t, size_t) ;
void free (void *) ;
void abort (void) ;
int atexit (void (* __func)() ) ;
void exit (int) ;
int system (const char *) ;
extern char ** environ;
char * getenv (const char *) ;
int putenv (const char *) ;
int setenv (const char *, const char *, int) ;
void unsetenv (const char *) ;
void * bsearch (const void *, const void *, size_t, size_t,
int (* __func) (const void *, const void *) ) ;
void qsort (void *, size_t, size_t,
int (* __func) (const void *, const void *) ) ;
int abs (int) ;
long labs (long) ;
div_t div (int, int) ;
ldiv_t ldiv (long, long) ;
void * memchr (const void *, int, size_t) ;
int mblen (const char *, size_t) ;
int mbtowc (wchar_t *, const char *, size_t) ;
int wctomb (char *, wchar_t) ;
size_t mbstowcs (wchar_t *, const char *, size_t) ;
size_t wcstombs (char *, const wchar_t *, size_t) ;
};
# 77 "../include/global.h" 2
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 1 3
# 61 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 3
typedef int ptrdiff_t;
# 182 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 3
# 256 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 3
typedef unsigned int wint_t;
# 302 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/stddef.h" 3
# 80 "../include/global.h" 2
# 1 "../mit-pthreads/include/math.h" 1
# 1 "../mit-pthreads/include/sys/__math.h" 1
# 5 "../mit-pthreads/include/math.h" 2
struct exception {
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern "C" {
double hypot (double, double) ;
double acos (double) ;
double asin (double) ;
double atan (double) ;
double atan2 (double, double) ;
double cos (double) ;
double sin (double) ;
double tan (double) ;
double cosh (double) ;
double sinh (double) ;
double tanh (double) ;
double exp (double) ;
double frexp (double, int *) ;
double ldexp (double, int) ;
double log (double) ;
double log10 (double) ;
double modf (double, double *) ;
double pow (double, double) ;
double sqrt (double) ;
double ceil (double) ;
double fabs (double) ;
double floor (double) ;
double fmod (double, double) ;
double rint (double) ;
int finite (double dsrc) ;
};
# 83 "../include/global.h" 2
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/limits.h" 1 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/syslimits.h" 1 3
# 1 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/limits.h" 1 3
# 113 "/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include/limits.h" 3
# 1 "/usr/include/limits.h" 1 3
# 175 "/usr/include/limits.h" 3
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (14/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (8 preceding siblings ...)
1998-09-08 19:36 ` bug (3/26) Brian Grossman
@ 1998-09-08 19:36 ` Brian Grossman
1998-09-08 19:36 ` bug (10/26) Brian Grossman
` (12 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 19:36 UTC (permalink / raw)
To: Alexandre Oliva
struct msghdr {
caddr_t msg_name;
int msg_namelen;
struct iovec *msg_iov;
int msg_iovlen;
caddr_t msg_accrights;
int msg_accrightslen;
};
extern "C" {
int accept (int, struct sockaddr *, int *) ;
int bind (int, const struct sockaddr *, int) ;
int connect (int, const struct sockaddr *, int) ;
int listen (int, int) ;
int socket (int, int, int) ;
};
# 27 "mysql_priv.h" 2
# 1 "/usr/include/netinet/in.h" 1 3
# 102 "/usr/include/netinet/in.h" 3
struct in_addr {
u_long s_addr;
};
# 174 "/usr/include/netinet/in.h" 3
struct sockaddr_in {
short sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
struct ip_mreq {
struct in_addr imr_multiaddr;
struct in_addr imr_interface;
};
# 253 "/usr/include/netinet/in.h" 3
# 28 "mysql_priv.h" 2
# 1 "../mit-pthreads/include/arpa/inet.h" 1
extern "C" {
unsigned long inet_addr (const char *) ;
int inet_aton (const char *, struct in_addr *) ;
unsigned long inet_lnaof (struct in_addr) ;
struct in_addr inet_makeaddr (unsigned long ,
unsigned long ) ;
unsigned long inet_netof (struct in_addr) ;
unsigned long inet_network (const char *) ;
char * inet_ntoa (struct in_addr) ;
char * inet_ntoa_r (struct in_addr in, char *buf,
int bufsize) ;
};
# 29 "mysql_priv.h" 2
}
# 1 "../include/mysql_com.h" 1
extern "C" {
enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
COM_FIELD_LIST,COM_CREATE_DB,COM_DROP_DB,COM_REFRESH,
COM_SHUTDOWN,COM_STATISTICS,
COM_PROCESS_INFO,COM_CONNECT,COM_PROCESS_KILL,
COM_DEBUG};
typedef struct st_net {
Socket fd;
int fcntl;
unsigned char *buff,*buff_end,*write_pos;
char last_error[200 ];
unsigned int last_errno,max_packet,timeout,pkt_nr;
my_bool error,return_errno;
} NET;
enum enum_field_types { FIELD_TYPE_DECIMAL, FIELD_TYPE_TINY,
FIELD_TYPE_SHORT, FIELD_TYPE_LONG,
FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE,
FIELD_TYPE_NULL, FIELD_TYPE_TIMESTAMP,
FIELD_TYPE_LONGLONG,FIELD_TYPE_INT24,
FIELD_TYPE_DATE, FIELD_TYPE_TIME,
FIELD_TYPE_DATETIME, FIELD_TYPE_YEAR,
FIELD_TYPE_NEWDATE,
FIELD_TYPE_ENUM=247,
FIELD_TYPE_SET=248,
FIELD_TYPE_TINY_BLOB=249,
FIELD_TYPE_MEDIUM_BLOB=250,
FIELD_TYPE_LONG_BLOB=251,
FIELD_TYPE_BLOB=252,
FIELD_TYPE_VAR_STRING=253,
FIELD_TYPE_STRING=254
};
extern unsigned long max_allowed_packet;
extern unsigned long net_buffer_length;
int my_net_init(NET *net,Socket fd);
void net_end(NET *net);
void net_clear(NET *net);
int net_flush(NET *net);
int my_net_write(NET *net,const byte *packet,unsigned int len);
int net_write_command(NET *net,unsigned char command,const byte *packet,
unsigned int len);
int net_real_write(NET *net,const byte *packet,unsigned int len);
unsigned int my_net_read(NET *net);
struct rand_struct {
unsigned long seed,seed2,max_value;
double max_value_dbl;
};
enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT};
typedef struct st_udf_args
{
unsigned int arg_count;
enum Item_result *arg_type;
char **args;
unsigned long *lengths;
} UDF_ARGS;
typedef struct st_udf_init
{
my_bool maybe_null;
unsigned int decimals;
unsigned int max_length;
char *ptr;
} UDF_INIT;
void randominit(struct rand_struct *rand,unsigned long seed1,
unsigned long seed2);
double rnd(struct rand_struct *rand);
void make_scrambled_password(char *to,const char *password);
void get_salt_from_password(unsigned long *res,const char *password);
char *scramble(char *to,const char *message,const char *password,
my_bool old_ver);
my_bool check_scramble(const char *scramble,const char *message,
unsigned long *salt,my_bool old_ver);
char *get_tty_password(char *opt_message);
}
# 37 "mysql_priv.h" 2
# 1 "unireg.h" 1
# 1 "derror.h" 1
# 117 "unireg.h" 2
# 1 "structs.h" 1
struct st_table;
class Field;
typedef struct st_date_format {
uint pos[6];
} DATE_FORMAT;
union un_ref {
uint32 lastpos;
byte refpos[4 ];
};
typedef struct st_keyfile_info {
union un_ref ref;
uint ref_length;
File filenr;
ulong records;
ulong deleted;
int errkey,sortkey;
long create_time;
long check_time;
long update_time;
ulong mean_rec_length;
ulong *rec_per_key;
} KEYFILE_INFO;
typedef struct st_key_part_info {
Field *field;
uint length;
uint16 offset;
uint16 key_type;
uint16 fieldnr;
uint8 key_part_flag;
} KEY_PART_INFO ;
typedef struct st_key {
uint key_length;
uint dupp_key;
uint key_parts;
uint usable_key_parts;
KEY_PART_INFO *key_part;
char *name;
} KEY;
enum reginfo_type { RI_NORMAL,RI_SYSTEM,RI_REPEAT,RI_REF,RI_CONST,RI_PROG };
enum db_type { DB_TYPE_DIAB_ISAM=1,DB_TYPE_HASH,DB_TYPE_MISAM,DB_TYPE_PISAM,
DB_TYPE_RMS_ISAM, DB_TYPE_HEAP, DB_TYPE_ISAM,
DB_TYPE_MRG_ISAM};
typedef struct st_ref_field {
char *ptr;
uint length;
Field *field;
} REF_FIELD;
typedef struct st_reginfo {
REF_FIELD ref_field[16 ];
uint ref_fields;
ulong reg_used;
int ref_key,user_key;
uint ref_length,key_length,user_keylength;
byte *key_buff;
bool update;
} REGINFO;
struct st_read_record;
class SQL_SELECT;
typedef struct st_read_record {
struct st_table *form;
struct st_table **forms;
int (*read_record)(struct st_read_record *);
SQL_SELECT *select;
uint cache_records;
uint ref_length,struct_length,reclength,rec_cache_size,error_offset;
byte *ref_pos;
byte *record;
byte *cache,*cache_pos,*cache_end,*read_positions;
IO_CACHE *io_cache;
} READ_RECORD;
typedef struct st_time {
uint year,month,day,hour,minute,sec;
} TIME;
typedef struct {
long year,month,day,hour,minute,second;
} INTERVAL;
enum SHOW_TYPE { SHOW_LONG,SHOW_CHAR,SHOW_INT,SHOW_CHAR_PTR,SHOW_BOOL,
SHOW_MY_BOOL};
struct show_var_st {
char *name,*value;
SHOW_TYPE type;
};
typedef struct lex_string {
char *str;
uint length;
} LEX_STRING;
# 118 "unireg.h" 2
# 38 "mysql_priv.h" 2
void init_sql_alloc(MEM_ROOT *root,uint block_size);
gptr sql_alloc(unsigned size);
gptr sql_calloc(unsigned size);
char *sql_strdup(const char *str);
char *sql_strmake(const char *str,uint len);
gptr sql_memdup(const void * ptr,unsigned size);
void sql_element_free(void *ptr);
struct st_table;
class THD;
typedef struct st_sql_list {
uint elements;
byte *first;
byte **next;
} SQL_LIST;
uint nr_of_decimals(const char *str);
# 1 "sql_string.h" 1
#pragma interface
class String
{
char *Ptr;
uint str_length,Alloced_length;
bool alloced;
public:
String()
{ Ptr=0; str_length=Alloced_length=0; alloced=0; }
String(uint length)
{ alloced=0; Alloced_length=0; (void) real_alloc(length); }
String(const char *str)
{ Ptr=(char*) str; str_length=strlen(str); Alloced_length=0; alloced=0;}
String(const char *str,uint len)
{ Ptr=(char*) str; str_length=len; Alloced_length=0; alloced=0;}
String(char *str,uint len)
{ Ptr=(char*) str; Alloced_length=str_length=len; alloced=0;}
String(const String &str)
{ Ptr=str.Ptr ; str_length=str.str_length ;
Alloced_length=str.Alloced_length; alloced=0; }
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (26/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (13 preceding siblings ...)
1998-09-08 20:53 ` bug (11/26) Brian Grossman
@ 1998-09-08 20:53 ` Brian Grossman
1998-09-08 20:53 ` bug (23/26) Brian Grossman
` (7 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 20:53 UTC (permalink / raw)
To: Alexandre Oliva
{ yyval.item = yyvsp[0].item; ;
break;}
case 540:
# 1587 "sql_yacc.yy"
{ yyval.item = new Item_int((int32) atol(yyvsp[0].lex_str.str),yyvsp[0].lex_str.length); ;
break;}
case 541:
# 1588 "sql_yacc.yy"
{ yyval.item = new Item_int(yyvsp[0].lex_str.str); ;
break;}
case 542:
# 1589 "sql_yacc.yy"
{ yyval.item = new Item_real(yyvsp[0].lex_str.str); ;
break;}
case 543:
# 1590 "sql_yacc.yy"
{ yyval.item = new Item_null();
_current_lex() ->next_state=STATE_OPERATOR_OR_IDENT;;
break;}
case 544:
# 1592 "sql_yacc.yy"
{ yyval.item = new Item_varbinary(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length);
break;}
case 545:
# 1593 "sql_yacc.yy"
{ yyval.item = yyvsp[0].item; ;
break;}
case 546:
# 1594 "sql_yacc.yy"
{ yyval.item = yyvsp[0].item; ;
break;}
case 547:
# 1595 "sql_yacc.yy"
{ yyval.item = yyvsp[0].item; ;
break;}
case 548:
# 1602 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 549:
# 1603 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 550:
# 1606 "sql_yacc.yy"
{ yyval.item = new Item_field(yyvsp[-2].lex_str.str,"*"); ;
break;}
case 551:
# 1607 "sql_yacc.yy"
{ yyval.item = new Item_field(yyvsp[-2].lex_str.str,"*"); ;
break;}
case 552:
# 1610 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 553:
# 1611 "sql_yacc.yy"
{ yyval.item = new Item_int(yyvsp[0].lex_str.str); ;
break;}
case 554:
# 1612 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 555:
# 1615 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 556:
# 1616 "sql_yacc.yy"
{ yyval.item = new Item_int(yyvsp[0].lex_str.str); ;
break;}
case 557:
# 1617 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 558:
# 1621 "sql_yacc.yy"
{ yyval.item = ! _current_lex() ->create_refs ? (Item*) new Item_field(__null ,yyvsp[0].lex_str.str) : (Item*) new Item_ref(__null ,yyvsp[0].lex_str.str); ;
break;}
case 559:
# 1623 "sql_yacc.yy"
{ yyval.item = ! _current_lex() ->create_refs ? (Item*) new Item_field(yyvsp[-2].lex_str.str,yyvsp[0].lex_str.str) : (Item*) new Item_ref(yyvsp[-2].lex_str.str,yyvsp[0].lex_str.str); ;
break;}
case 560:
# 1625 "sql_yacc.yy"
{ yyval.item = ! _current_lex() ->create_refs ? (Item*) new Item_field(yyvsp[-2].lex_str.str,yyvsp[0].lex_str.str) : (Item*) new Item_ref(yyvsp[-2].lex_str.str,yyvsp[0].lex_str.str); ;
break;}
case 561:
# 1627 "sql_yacc.yy"
{ yyval.item = ! _current_lex() ->create_refs ? (Item*) new Item_field(yyvsp[-2].lex_str.str,yyvsp[0].lex_str.str) : (Item*) new Item_ref(yyvsp[-2].lex_str.str,yyvsp[0].lex_str.str); ;
break;}
case 562:
# 1631 "sql_yacc.yy"
{ yyval.lex_str=yyvsp[0].lex_str;;
break;}
case 563:
# 1632 "sql_yacc.yy"
{ yyval.lex_str=yyvsp[0].lex_str;;
break;}
case 564:
# 1633 "sql_yacc.yy"
{ yyval.lex_str=yyvsp[0].lex_str;;
break;}
case 565:
# 1635 "sql_yacc.yy"
{ yyval.lex_str=yyvsp[0].lex_str; ;
break;}
case 566:
# 1637 "sql_yacc.yy"
{
yyval.lex_str.str=sql_strmake(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length);
yyval.lex_str.length=yyvsp[0].lex_str.length;
_current_lex() ->next_state=STATE_OPERATOR_OR_IDENT;
;
break;}
case 567:
# 1646 "sql_yacc.yy"
{;
break;}
case 568:
# 1647 "sql_yacc.yy"
{;
break;}
case 569:
# 1648 "sql_yacc.yy"
{;
break;}
case 570:
# 1649 "sql_yacc.yy"
{;
break;}
case 571:
# 1650 "sql_yacc.yy"
{;
break;}
case 572:
# 1651 "sql_yacc.yy"
{;
break;}
case 573:
# 1652 "sql_yacc.yy"
{;
break;}
case 574:
# 1653 "sql_yacc.yy"
{;
break;}
case 575:
# 1654 "sql_yacc.yy"
{;
break;}
case 576:
# 1655 "sql_yacc.yy"
{;
break;}
case 577:
# 1656 "sql_yacc.yy"
{;
break;}
case 578:
# 1657 "sql_yacc.yy"
{;
break;}
case 579:
# 1658 "sql_yacc.yy"
{;
break;}
case 580:
# 1659 "sql_yacc.yy"
{;
break;}
case 581:
# 1660 "sql_yacc.yy"
{;
break;}
case 582:
# 1661 "sql_yacc.yy"
{;
break;}
case 583:
# 1662 "sql_yacc.yy"
{;
break;}
case 584:
# 1663 "sql_yacc.yy"
{;
break;}
case 585:
# 1664 "sql_yacc.yy"
{;
break;}
case 586:
# 1670 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_SET_OPTION;
_current_lex() ->options= _current_thd() ->options;
_current_lex() ->select_limit= _current_thd() ->default_select_limit;
;
break;}
case 588:
# 1678 "sql_yacc.yy"
{;
break;}
case 589:
# 1679 "sql_yacc.yy"
{;
break;}
case 592:
# 1687 "sql_yacc.yy"
{
if (atoi(yyvsp[0].lex_str.str) == 0)
_current_lex() ->options&= ~yyvsp[-2].num;
else
_current_lex() ->options|= yyvsp[-2].num;
;
break;}
case 593:
# 1694 "sql_yacc.yy"
{
_current_lex() ->select_limit= yyvsp[0].ulong_num;
;
break;}
case 594:
# 1698 "sql_yacc.yy"
{
_current_thd() ->set_time((time_t) yyvsp[0].ulong_num);
;
break;}
case 595:
# 1702 "sql_yacc.yy"
{
_current_thd() ->user_time=0;
;
break;}
case 596:
# 1706 "sql_yacc.yy"
{
_current_thd() ->insert_id(yyvsp[0].ulonglong_num);
;
break;}
case 597:
# 1710 "sql_yacc.yy"
{
CONVERT *tmp;
if (!(tmp=get_convert_set(yyvsp[0].lex_str.str)))
{
net_printf(& _current_thd() ->net,1115 ,yyvsp[0].lex_str);
return(1) ;
}
_current_thd() ->convert_set=tmp;
;
break;}
case 598:
# 1720 "sql_yacc.yy"
{
_current_thd() ->convert_set=0;
;
break;}
case 599:
# 1725 "sql_yacc.yy"
{ yyval.num= 512 ; ;
break;}
case 600:
# 1726 "sql_yacc.yy"
{ yyval.num= 1024 ; ;
break;}
case 601:
# 1727 "sql_yacc.yy"
{ yyval.num= 2048 ; ;
break;}
case 602:
# 1733 "sql_yacc.yy"
{
_current_lex() ->sql_command=SQL_LOCK_TABLES;
;
break;}
case 608:
# 1748 "sql_yacc.yy"
{ if (!add_table_to_list(yyvsp[-1].lex_str.str,yyvsp[-1].lex_str.length,__null ,yyvsp[0].num)) return(1) ; ;
break;}
case 609:
# 1750 "sql_yacc.yy"
{ if (!add_table_to_list(yyvsp[-3].lex_str.str,yyvsp[-3].lex_str.length,yyvsp[-1].lex_str.str, yyvsp[0].num)) return(1) ; ;
break;}
case 610:
# 1753 "sql_yacc.yy"
{ yyval.num=0; ;
break;}
case 611:
# 1754 "sql_yacc.yy"
{ yyval.num=1; ;
break;}
case 612:
# 1758 "sql_yacc.yy"
{ _current_lex() ->sql_command=SQL_UNLOCK_TABLES; ;
break;}
case 613:
# 1765 "sql_yacc.yy"
{
_current_lex() ->sql_command = SQL_GRANT;
;
break;}
case 626:
# 1787 "sql_yacc.yy"
{;
break;}
case 627:
# 1788 "sql_yacc.yy"
{;
break;}
case 628:
# 1791 "sql_yacc.yy"
{;
break;}
case 629:
# 1792 "sql_yacc.yy"
{;
break;}
case 630:
# 1795 "sql_yacc.yy"
{;
break;}
case 631:
# 1796 "sql_yacc.yy"
{;
break;}
case 632:
# 1799 "sql_yacc.yy"
{;
break;}
case 633:
# 1800 "sql_yacc.yy"
{;
break;}
}
# 497 "/my/gnu/lib/bison/bison.simple"
\f
yyvsp -= yylen;
yyssp -= yylen;
# 514 "/my/gnu/lib/bison/bison.simple"
*++yyvsp = yyval;
# 533 "/my/gnu/lib/bison/bison.simple"
yyn = yyr1[yyn];
yystate = yypgoto[yyn - 291 ] + *yyssp;
if (yystate >= 0 && yystate <= 12972 && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - 291 ];
goto yynewstate;
yyerrlab:
if (! yyerrstatus)
{
++yynerrs;
# 597 "/my/gnu/lib/bison/bison.simple"
yyerror("parse error");
}
goto yyerrlab1;
yyerrlab1:
if (yyerrstatus == 3)
{
if (yychar == 0 )
return(1) ;
yychar = -2 ;
}
yyerrstatus = 3;
goto yyerrhandle;
yyerrdefault:
yyerrpop:
if (yyssp == yyss) return(1) ;
yyvsp--;
yystate = *--yyssp;
# 654 "/my/gnu/lib/bison/bison.simple"
yyerrhandle:
yyn = yypact[yystate];
if (yyn == -32768 )
goto yyerrdefault;
yyn += 1 ;
if (yyn < 0 || yyn > 12972 || yycheck[yyn] != 1 )
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == -32768 )
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == 1465 )
return(0) ;
*++yyvsp = yylval;
yystate = yyn;
goto yynewstate;
}
# 1801 "sql_yacc.yy"
--==_Exmh_-1474766440
Content-Type: text/plain ; name="J"; charset=us-ascii
Content-Description: J
Content-Disposition: attachment; filename="J"
Reading specs from /usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/cpp -lang-c++ -v -I../mit-pthreads/include -I./../include -I./../regex -I. -I../include -I.. -I. -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa) -D__EXCEPTIONS -D__OPTIMIZE__ -D_HPUX_SOURCE -D_HIUX_SOURCE -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="/opt/mysql" -DDATADIR="/var/opt/mysql" -DSHAREDIR="/opt/mysql/share/mysql" -DHAVE_CONFIG_H -DDBUG_OFF sql_yacc.cc sql_yacc.ii
GNU CPP version egcs-2.90.29 980515 (egcs-1.0.3 release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
../mit-pthreads/include
../include
../regex
.
../include
..
.
/usr/local/gnu/include/g++
/usr/local/include
/usr/local/gnu/hppa1.0-hp-hpux10.20/include
/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/include
/usr/include
End of search list.
/usr/local/gnu/lib/gcc-lib/hppa1.0-hp-hpux10.20/egcs-2.90.29/cc1plus sql_yacc.ii -quiet -dumpbase sql_yacc.cc -O2 -version -fno-implicit-templates -o sql_yacc.s
GNU C++ version egcs-2.90.29 980515 (egcs-1.0.3 release) (hppa1.0-hp-hpux10.20) compiled by GNU C version egcs-2.90.21 971202 (egcs-1.00 release).
/my/gnu/lib/bison/bison.simple: In function `int yyparse()':
/my/gnu/lib/bison/bison.simple:692: Internal compiler error.
/my/gnu/lib/bison/bison.simple:692: Please submit a full bug report to `egcs-bugs@cygnus.com'.
--==_Exmh_-1474766440--
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (11/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (12 preceding siblings ...)
1998-09-08 20:53 ` bug (24/26) Brian Grossman
@ 1998-09-08 20:53 ` Brian Grossman
1998-09-08 20:53 ` bug (26/26) Brian Grossman
` (8 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 20:53 UTC (permalink / raw)
To: Alexandre Oliva
typedef char *gptr;
typedef char int8;
typedef short int16;
typedef unsigned char uchar;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef int int32;
typedef unsigned int uint32;
typedef unsigned long long ulonglong;
typedef long long longlong;
typedef unsigned long my_off_t;
typedef uint8 int7;
typedef short int15;
typedef char *my_string;
typedef unsigned long size_s;
typedef int myf;
typedef char byte;
typedef char my_bool;
# 634 "../include/global.h"
# 15 "mysql_priv.h" 2
# 1 "../include/my_sys.h" 1
extern "C" {
extern int *_my_errno(void) ;
# 90 "../include/my_sys.h"
extern gptr my_malloc(uint Size,myf MyFlags);
extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags);
extern void my_no_flags_free(gptr ptr);
extern gptr my_memdup(const byte *from,uint length,myf MyFlags);
extern my_string my_strdup(const char *from,myf MyFlags);
# 123 "../include/my_sys.h"
extern int (* __error()) ;
extern char ** errmsg[];
extern char errbuff[(2) ][(256 ) ];
extern char *home_dir;
extern char *my_progname;
extern char curr_dir[];
extern int (*error_handler_hook)(uint my_error, const char *str,myf MyFlags);
extern int (*fatal_error_handler_hook)(uint my_error, const char *str,
myf MyFlags);
extern void (*my_sigtstp_cleanup)(void),
(*my_sigtstp_restart)(void),
(*my_abort_hook)(int);
extern int my_umask,
my_recived_signals,
my_safe_to_handle_signal,
my_dont_interrupt;
extern my_bool mysys_uses_curses;
extern long lCurMemory,lMaxMemory;
extern ulong my_default_record_cache_size;
extern my_bool my_disable_locking, my_disable_async_io,
my_disable_flush_key_blocks;
extern char wild_many,wild_one,wild_prefix;
typedef struct wild_file_pack
{
uint wilds;
uint not_pos;
my_string *wild;
} WF_PACK;
typedef struct st_typelib {
uint count;
my_string name;
my_string *type_names;
} TYPELIB;
enum cache_type {READ_CACHE,WRITE_CACHE};
typedef struct st_record_cache
{
File file;
int rc_seek,error,inited;
uint rc_length,read_length,reclength;
my_off_t rc_record_pos,end_of_file;
byte *rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
enum cache_type type;
} RECORD_CACHE;
enum file_type { UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE,
STREAM_BY_FOPEN, STREAM_BY_FDOPEN };
extern struct my_file_info
{
my_string name;
enum file_type type;
} my_file_info[127 ];
typedef struct st_dynamic_array {
char *buffer;
uint elements,max_element;
uint alloc_increment;
uint size_of_element;
} DYNAMIC_ARRAY;
typedef struct st_dynamic_string {
char *str;
uint length,max_length,alloc_increment;
} DYNAMIC_STRING;
typedef struct st_io_cache
{
byte *rc_pos,*rc_end,*buffer,*rc_request_pos;
File file;
int seek_not_done,error;
uint buffer_length,read_length;
my_off_t pos_in_file,end_of_file;
myf myflags;
enum cache_type type;
int (*read_function)(struct st_io_cache *,byte *,uint);
char *file_name;
} IO_CACHE;
typedef struct st_changeable_var {
const char *name;
long *varptr;
long def_value,min_value,max_value,sub_size,block_size;
} CHANGEABLE_VAR;
typedef struct st_used_mem {
struct st_used_mem *next;
unsigned int left;
unsigned int size;
} USED_MEM;
typedef struct st_mem_root {
USED_MEM *free;
USED_MEM *used;
unsigned int min_malloc;
unsigned int block_size;
void (*error_handler)(void);
} MEM_ROOT;
extern int my_copy(const char *from,const char *to,myf MyFlags);
extern int my_append(const char *from,const char *to,myf MyFlags);
extern int my_delete(const char *name,myf MyFlags);
extern int my_getwd(my_string buf,uint size,myf MyFlags);
extern int my_setwd(const char *dir,myf MyFlags);
extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
extern gptr my_once_alloc(uint Size,myf MyFlags);
extern void my_once_free(void);
extern my_string my_tempnam(const char *dir,const char *pfx,myf MyFlags);
extern File my_open(const char *FileName,int Flags,myf MyFlags);
extern File my_create(const char *FileName,int CreateFlags,
int AccsesFlags, myf MyFlags);
extern int my_close(File Filedes,myf MyFlags);
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags);
extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
myf MyFlags);
extern int my_rename(const char *from,const char *to,myf MyFlags);
extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_tell(File fd,myf MyFlags);
extern uint my_write(File Filedes,const byte *Buffer,uint Count,
myf MyFlags);
extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count,
my_off_t offset,myf MyFlags);
extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags);
extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count,
myf MyFlags);
extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
extern my_off_t my_ftell(FILE *stream,myf MyFlags);
extern gptr _mymalloc(uint uSize,const char *sFile,
uint uLine, myf MyFlag);
extern gptr _myrealloc(my_string pPtr,uint uSize,const char *sFile,
uint uLine, myf MyFlag);
extern gptr my_multi_malloc (myf MyFlags, ...) ;
extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag);
extern int _sanity(const char *sFile,unsigned int uLine);
extern gptr _my_memdup(const byte *from,uint length,
const char *sFile, uint uLine,myf MyFlag);
extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
myf MyFlag);
extern void init_glob_errs(void);
extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
extern FILE *my_fdopen(File Filedes,int Flags,myf MyFlags);
extern int my_fclose(FILE *fd,myf MyFlags);
extern int my_chsize(File fd,my_off_t newlength,myf MyFlags);
extern int my_error (int nr,myf MyFlags, ...) ;
extern int my_printf_error (uint my_error, const my_string format,
myf MyFlags, ...) ;
extern int my_message(uint my_error, const char *str,myf MyFlags);
extern int my_message_no_curses(uint my_error, const char *str,myf MyFlags);
extern int my_message_curses(uint my_error, const char *str,myf MyFlags);
extern void my_init(void);
extern void my_end(int infoflag);
extern int my_redel(const char *from, const char *to, int MyFlags);
extern int my_copystat(const char *from, const char *to, int MyFlags);
extern my_string my_filename(File fd);
extern void dont_break(void);
extern void allow_break(void);
extern void my_remember_signal(int signal_number,sig_handler (*func)(int));
extern void caseup(my_string str,uint length);
extern void casedn(my_string str,uint length);
extern void caseup_str(my_string str);
extern void casedn_str(my_string str);
extern void case_sort(my_string str,uint length);
extern uint dirname_part(my_string to,const char *name);
extern uint dirname_length(const char *name);
extern int test_if_hard_path(const char *dir_name);
extern void convert_dirname(my_string name);
extern void to_unix_path(my_string name);
extern my_string fn_ext(const char *name);
extern my_string fn_same(my_string toname,const char *name,int flag);
extern my_string fn_format(my_string to,const char *name,const char *dsk,
const char *form,int flag);
extern size_s strlength(const char *str);
extern void pack_dirname(my_string to,const char *from);
extern uint unpack_dirname(my_string to,const char *from);
extern uint cleanup_dirname(my_string to,const char *from);
extern uint system_filename(my_string to,const char *from);
extern my_string unpack_filename(my_string to,const char *from);
extern my_string intern_filename(my_string to,const char *from);
extern my_string directory_file_name(my_string dst, my_string src);
extern int pack_filename(my_string to, my_string name, size_s max_length);
extern my_string my_path(my_string to,const char *progname,
const char *own_pathname_part);
extern my_string my_load_path(my_string to, const char *path,
const char *own_path_prefix);
extern int wild_compare(const char *str,const char *wildstr);
extern my_string strcasestr(const char *src,const char *suffix);
extern int my_strcasecmp(const char *s,const char *t);
extern int my_strsortcmp(const char *s,const char *t);
extern int my_casecmp(const char *s,const char *t,uint length);
extern int my_sortcmp(const char *s,const char *t,uint length);
extern WF_PACK *wf_comp(my_string str);
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
extern void wf_end(struct wild_file_pack *buffer);
extern size_s stripp_sp(my_string str);
extern void get_date(my_string to,int timeflag,time_t use_time);
extern void soundex(my_string out_pntr, my_string in_pntr,pbool remove_garbage);
extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
uint reclength,enum cache_type type,
pbool use_async_io);
extern int read_cache_record(RECORD_CACHE *info,byte *to);
extern int end_record_cache(RECORD_CACHE *info);
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
const byte *record,uint length);
extern int flush_write_cache(RECORD_CACHE *info);
extern long my_clock(void);
extern sig_handler sigtstp_handler(int signal_number);
extern void handle_recived_signals(void);
extern int init_key_cache(ulong use_mem,ulong leave_this_much_mem);
extern byte *key_cache_read(File file,my_off_t filepos,byte* buff,uint length,
uint block_length,int return_buffer);
extern int key_cache_write(File file,my_off_t filepos,byte* buff,uint length,
uint block_length,int force_write);
extern int flush_key_blocks(int file,pbool free_used_blocks);
extern void end_key_cache(void);
extern sig_handler my_set_alarm_variable(int signo);
extern void my_string_ptr_sort(void *base,uint items,size_s size);
extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
size_s size_of_element,uchar *buffer[]);
extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
enum cache_type type,my_off_t seek_offset,
pbool use_async_io, myf cache_myflags);
extern void reinit_io_cache(IO_CACHE *info,enum cache_type type,
my_off_t seek_offset,pbool use_async_io);
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
extern int _my_b_get(IO_CACHE *info);
extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
extern int flush_io_cache(IO_CACHE *info);
extern int end_io_cache(IO_CACHE *info);
extern int open_cacheed_file(IO_CACHE *cache,const char *dir,
const char *prefix, uint cache_size);
extern void close_cacheed_file(IO_CACHE *cache);
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc,uint alloc_increment);
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
extern byte *pop_dynamic(DYNAMIC_ARRAY*);
extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint index);
extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint index);
extern void delete_dynamic(DYNAMIC_ARRAY *array);
extern void freeze_size(DYNAMIC_ARRAY *array);
extern int find_type(my_string x,TYPELIB *typelib,uint full_name);
extern void make_type(my_string to,uint nr,TYPELIB *typelib);
extern my_string get_type(TYPELIB *typelib,uint nr);
extern my_bool init_dynamic_string(DYNAMIC_STRING *str, my_string init_str,
uint init_alloc,uint alloc_increment);
extern my_bool dynstr_append(DYNAMIC_STRING *str, my_string append);
extern void dynstr_free(DYNAMIC_STRING *str);
void set_all_changeable_vars(CHANGEABLE_VAR *vars);
my_bool set_changeable_var(my_string str,CHANGEABLE_VAR *vars);
void init_alloc_root(MEM_ROOT *mem_root,uint block_size);
gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
void free_root(MEM_ROOT *root);
char *strdup_root(MEM_ROOT *root,const char *str);
char *memdup_root(MEM_ROOT *root,const char *str,uint len);
void load_defaults(const char *conf_file, my_string *groups,
int *argc, char ***argv);
my_bool my_compress(byte *, ulong *, ulong *);
my_bool my_uncompress(byte *, ulong *, ulong *);
byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
}
# 16 "mysql_priv.h" 2
# 1 "../include/m_string.h" 1
# 1 "../mit-pthreads/include/string.h" 1
# 1 "../mit-pthreads/include/sys/__string.h" 1
extern "C" {
int bcmp (const void *, const void *, size_t) ;
void bcopy (const void *, void *, size_t) ;
void bzero (void *, size_t) ;
char *index (const char *, int) ;
char *rindex (const char *, int) ;
char *strdup (const char *) ;
};
# 43 "../mit-pthreads/include/string.h" 2
extern "C" {
void *memchr (const void *, int, size_t) ;
int memcmp (const void *, const void *, size_t) ;
void *memcpy (void *, const void *, size_t) ;
void *memmove (void *, const void *, size_t) ;
void *memset (void *, int, size_t) ;
char *strcat (char *, const char *) ;
char *strchr (const char *, int) ;
int strcmp (const char *, const char *) ;
int strcoll (const char *, const char *) ;
char *strcpy (char *, const char *) ;
size_t strcspn (const char *, const char *) ;
char *strerror (int) ;
size_t strlen (const char *) ;
char *strncat (char *, const char *, size_t) ;
int strncmp (const char *, const char *, size_t) ;
char *strncpy (char *, const char *, size_t) ;
char *strpbrk (const char *, const char *) ;
char *strrchr (const char *, int) ;
size_t strspn (const char *, const char *) ;
char *strstr (const char *, const char *) ;
char *strtok (char *, const char *) ;
char *strtok_r (char *, const char *, char **) ;
size_t strxfrm (char *, const char *, size_t) ;
int ffs (int) ;
void *memccpy (void *, const void *, int, size_t) ;
int strcasecmp (const char *, const char *) ;
int strncasecmp (const char *, const char *, size_t) ;
char *strsignal (int) ;
void swab (const void *, void *, size_t) ;
};
# 12 "../include/m_string.h" 2
extern "C" {
extern char _dig_vec[];
extern void bmove512(gptr dst,const gptr src,uint len);
extern void bmove_upp(char *dst,const char *src,uint len);
extern void bchange(char *dst,uint old_len,const char *src,
uint new_len,uint tot_len);
extern void strappend(char *s,uint len,pchar fill);
extern char *strend(const char *s);
extern char *strcend(const char *, pchar);
extern char *strfield(char *src,int fields,int chars,int blanks,
int tabch);
extern char *strfill(my_string s,uint len,pchar fill);
extern uint strinstr(const char *str,const char *search);
extern char *strkey(char *dst,char *head,char *tail,char *flags);
extern char *strmake(char *dst,const char *src,uint length);
extern char *strmov(char *dst,const char *src);
extern uint strnlen(const char *s,uint n);
extern char *strnmov(char *dst,const char *src,uint n);
extern char *strsuff(const char *src,const char *suffix);
extern char *strcont(const char *src,const char *set);
extern char *strxcat (char *dst,const char *src, ...) ;
extern char *strxmov (char *dst,const char *src, ...) ;
extern char *strxcpy (char *dst,const char *src, ...) ;
extern char *strxncat (char *dst,uint len, const char *src, ...) ;
extern char *strxnmov (char *dst,uint len, const char *src, ...) ;
extern char *strxncpy (char *dst,uint len, const char *src, ...) ;
# 135 "../include/m_string.h"
extern qsort_cmp get_ptr_compare(uint);
extern int is_prefix(const char *, const char *);
extern char *my_itoa(int val,char *dst,int radix);
extern char *my_ltoa(long val,char *dst,int radix);
extern char *int2str(long val,char *dst,int radix);
extern char *str2int(const char *src,int radix,long lower,long upper,
long *val);
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (7/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (15 preceding siblings ...)
1998-09-08 20:53 ` bug (23/26) Brian Grossman
@ 1998-09-08 20:53 ` Brian Grossman
1998-09-08 21:44 ` bug (15/26) Brian Grossman
` (5 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 20:53 UTC (permalink / raw)
To: Alexandre Oliva
typedef struct {
int si_code;
int si_errno;
union {
struct {
pid_t __pid;
union {
struct {
uid_t __uid;
} __kill;
struct {
int __status;
} __SIGCLD;
} __pdata;
} __proc;
struct {
caddr_t *__addr;
} __fault;
struct {
int __fd;
long __band;
} __file;
} __data;
} k_siginfo_t;
# 16 "/usr/include/sys/signal.h" 2 3
# 1 "/usr/include/sys/newsig.h" 1 3
typedef struct __sigset_t {
long sigset[8];
} sigset_t;
# 1 "/usr/include/machine/save_state.h" 1 3
typedef struct __fp_dbl_block {
double ss_fp0;
double ss_fp1;
double ss_fp2;
double ss_fp3;
double ss_fp4;
double ss_fp5;
double ss_fp6;
double ss_fp7;
double ss_fp8;
double ss_fp9;
double ss_fp10;
double ss_fp11;
double ss_fp12;
double ss_fp13;
double ss_fp14;
double ss_fp15;
double ss_fp16;
double ss_fp17;
double ss_fp18;
double ss_fp19;
double ss_fp20;
double ss_fp21;
double ss_fp22;
double ss_fp23;
double ss_fp24;
double ss_fp25;
double ss_fp26;
double ss_fp27;
double ss_fp28;
double ss_fp29;
double ss_fp30;
double ss_fp31;
} fp_dbl_block_t;
typedef struct __fp_int_block {
int ss_fpstat;
int ss_fpexcept1;
int ss_fpexcept2;
int ss_fpexcept3;
int ss_fpexcept4;
int ss_fpexcept5;
int ss_fpexcept6;
int ss_fpexcept7;
int ss_fp4_hi;
int ss_fp4_lo;
int ss_fp5_hi;
int ss_fp5_lo;
int ss_fp6_hi;
int ss_fp6_lo;
int ss_fp7_hi;
int ss_fp7_lo;
int ss_fp8_hi;
int ss_fp8_lo;
int ss_fp9_hi;
int ss_fp9_lo;
int ss_fp10_hi;
int ss_fp10_lo;
int ss_fp11_hi;
int ss_fp11_lo;
int ss_fp12_hi;
int ss_fp12_lo;
int ss_fp13_hi;
int ss_fp13_lo;
int ss_fp14_hi;
int ss_fp14_lo;
int ss_fp15_hi;
int ss_fp15_lo;
int ss_fp16_hi;
int ss_fp16_lo;
int ss_fp17_hi;
int ss_fp17_lo;
int ss_fp18_hi;
int ss_fp18_lo;
int ss_fp19_hi;
int ss_fp19_lo;
int ss_fp20_hi;
int ss_fp20_lo;
int ss_fp21_hi;
int ss_fp21_lo;
int ss_fp22_hi;
int ss_fp22_lo;
int ss_fp23_hi;
int ss_fp23_lo;
int ss_fp24_hi;
int ss_fp24_lo;
int ss_fp25_hi;
int ss_fp25_lo;
int ss_fp26_hi;
int ss_fp26_lo;
int ss_fp27_hi;
int ss_fp27_lo;
int ss_fp28_hi;
int ss_fp28_lo;
int ss_fp29_hi;
int ss_fp29_lo;
int ss_fp30_hi;
int ss_fp30_lo;
int ss_fp31_hi;
int ss_fp31_lo;
} fp_int_block_t;
# 345 "/usr/include/machine/save_state.h" 3
typedef struct __reg64 {
# 415 "/usr/include/machine/save_state.h" 3
int ss_reserved[2*64];
} __reg64_t;
typedef struct __reg32 {
uint32_t ss_reserved[2];
uint32_t ss_gr1_hi;
uint32_t ss_gr1_lo;
uint32_t ss_rp_hi;
uint32_t ss_rp_lo;
uint32_t ss_gr3_hi;
uint32_t ss_gr3_lo;
uint32_t ss_gr4_hi;
uint32_t ss_gr4_lo;
uint32_t ss_gr5_hi;
uint32_t ss_gr5_lo;
uint32_t ss_gr6_hi;
uint32_t ss_gr6_lo;
uint32_t ss_gr7_hi;
uint32_t ss_gr7_lo;
uint32_t ss_gr8_hi;
uint32_t ss_gr8_lo;
uint32_t ss_gr9_hi;
uint32_t ss_gr9_lo;
uint32_t ss_gr10_hi;
uint32_t ss_gr10_lo;
uint32_t ss_gr11_hi;
uint32_t ss_gr11_lo;
uint32_t ss_gr12_hi;
uint32_t ss_gr12_lo;
uint32_t ss_gr13_hi;
uint32_t ss_gr13_lo;
uint32_t ss_gr14_hi;
uint32_t ss_gr14_lo;
uint32_t ss_gr15_hi;
uint32_t ss_gr15_lo;
uint32_t ss_gr16_hi;
uint32_t ss_gr16_lo;
uint32_t ss_gr17_hi;
uint32_t ss_gr17_lo;
uint32_t ss_gr18_hi;
uint32_t ss_gr18_lo;
uint32_t ss_gr19_hi;
uint32_t ss_gr19_lo;
uint32_t ss_gr20_hi;
uint32_t ss_gr20_lo;
uint32_t ss_gr21_hi;
uint32_t ss_gr21_lo;
uint32_t ss_gr22_hi;
uint32_t ss_gr22_lo;
uint32_t ss_arg3_hi;
uint32_t ss_arg3_lo;
uint32_t ss_arg2_hi;
uint32_t ss_arg2_lo;
uint32_t ss_arg1_hi;
uint32_t ss_arg1_lo;
uint32_t ss_arg0_hi;
uint32_t ss_arg0_lo;
unsigned int ss_dp_hi;
unsigned int ss_dp_lo;
unsigned int ss_ret0_hi;
unsigned int ss_ret0_lo;
unsigned int ss_ret1_hi;
unsigned int ss_ret1_lo;
unsigned int ss_sp_hi;
unsigned int ss_sp_lo;
unsigned int ss_gr31_hi;
unsigned int ss_gr31_lo;
unsigned int ss_cr11_hi;
unsigned int ss_cr11_lo;
unsigned int ss_pcoq_head_hi;
unsigned int ss_pcoq_head_lo;
unsigned int ss_pcsq_head_hi;
unsigned int ss_pcsq_head_lo;
unsigned int ss_pcoq_tail_hi;
unsigned int ss_pcoq_tail_lo;
unsigned int ss_pcsq_tail_hi;
unsigned int ss_pcsq_tail_lo;
unsigned int ss_cr15_hi;
unsigned int ss_cr15_lo;
unsigned int ss_cr19_hi;
unsigned int ss_cr19_lo;
unsigned int ss_cr20_hi;
unsigned int ss_cr20_lo;
unsigned int ss_cr21_hi;
unsigned int ss_cr21_lo;
unsigned int ss_cr22_hi;
unsigned int ss_cr22_lo;
unsigned int ss_cpustate_hi;
unsigned int ss_cpustate_lo;
unsigned int ss_sr4_hi;
unsigned int ss_sr4_lo;
unsigned int ss_sr0_hi;
unsigned int ss_sr0_lo;
unsigned int ss_sr1_hi;
unsigned int ss_sr1_lo;
unsigned int ss_sr2_hi;
unsigned int ss_sr2_lo;
unsigned int ss_sr3_hi;
unsigned int ss_sr3_lo;
unsigned int ss_sr5_hi;
unsigned int ss_sr5_lo;
unsigned int ss_sr6_hi;
unsigned int ss_sr6_lo;
unsigned int ss_sr7_hi;
unsigned int ss_sr7_lo;
unsigned int ss_cr0_hi;
unsigned int ss_cr0_lo;
unsigned int ss_cr8_hi;
unsigned int ss_cr8_lo;
unsigned int ss_cr9_hi;
unsigned int ss_cr9_lo;
unsigned int ss_cr10_hi;
unsigned int ss_cr10_lo;
unsigned int ss_cr12_hi;
unsigned int ss_cr12_lo;
unsigned int ss_cr13_hi;
unsigned int ss_cr13_lo;
unsigned int ss_cr24_hi;
unsigned int ss_cr24_lo;
unsigned int ss_cr25_hi;
unsigned int ss_cr25_lo;
unsigned int ss_cr26_hi;
unsigned int ss_cr26_lo;
unsigned int ss_reserved2[6];
unsigned int ss_oldcksum;
unsigned int ss_newcksum;
} __reg32_t;
typedef struct __ss_narrow {
int ss_gr1;
int ss_rp;
int ss_gr3;
int ss_gr4;
int ss_gr5;
int ss_gr6;
int ss_gr7;
int ss_gr8;
int ss_gr9;
int ss_gr10;
int ss_gr11;
int ss_gr12;
int ss_gr13;
int ss_gr14;
int ss_gr15;
int ss_gr16;
int ss_gr17;
int ss_gr18;
int ss_gr19;
int ss_gr20;
int ss_gr21;
int ss_gr22;
int ss_arg3;
int ss_arg2;
int ss_arg1;
int ss_arg0;
unsigned int ss_dp;
unsigned int ss_ret0;
unsigned int ss_ret1;
unsigned int ss_sp;
unsigned int ss_gr31;
unsigned int ss_cr11;
unsigned int ss_pcoq_head;
unsigned int ss_pcsq_head;
unsigned int ss_pcoq_tail;
unsigned int ss_pcsq_tail;
unsigned int ss_cr15;
unsigned int ss_cr19;
unsigned int ss_cr20;
unsigned int ss_cr21;
unsigned int ss_cr22;
unsigned int ss_cpustate;
unsigned int ss_sr4;
unsigned int ss_sr0;
unsigned int ss_sr1;
unsigned int ss_sr2;
unsigned int ss_sr3;
unsigned int ss_sr5;
unsigned int ss_sr6;
unsigned int ss_sr7;
unsigned int ss_cr0;
unsigned int ss_cr8;
unsigned int ss_cr9;
unsigned int ss_cr10;
unsigned int ss_cr12;
unsigned int ss_cr13;
unsigned int ss_cr24;
unsigned int ss_cr25;
unsigned int ss_cr26;
unsigned int ss_mpsfu_high;
unsigned int ss_mpsfu_low;
unsigned int ss_mpsfu_ovflo;
} __ss_narrow_t;
typedef struct __save_state {
int ss_flags;
__ss_narrow_t ss_narrow;
int ss_pad;
union {
fp_dbl_block_t fpdbl;
fp_int_block_t fpint;
} ss_fpblock;
char ss_xor[4*32];
union {
__reg64_t ss_64;
__reg32_t ss_32;
} ss_wide;
} save_state_t;
# 743 "/usr/include/machine/save_state.h" 3
# 816 "/usr/include/machine/save_state.h" 3
# 875 "/usr/include/machine/save_state.h" 3
# 965 "/usr/include/machine/save_state.h" 3
# 1260 "/usr/include/machine/save_state.h" 3
# 43 "/usr/include/sys/newsig.h" 2 3
typedef struct {
void *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
typedef save_state_t mcontext_t;
struct __sub_ctxt {
struct __ucontext *__uc_link;
sigset_t __uc_sigmask;
stack_t __uc_stack;
};
typedef struct __ucontext {
mcontext_t uc_mcontext;
int uc_spares[8];
unsigned int uc_created_by_getcontext:1;
unsigned int uc_reserved_flags:31;
struct __sub_ctxt uc_subcontext;
} ucontext_t;
# 110 "/usr/include/sys/newsig.h" 3
# 17 "/usr/include/sys/signal.h" 2 3
# 34 "/usr/include/sys/signal.h" 3
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (23/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (14 preceding siblings ...)
1998-09-08 20:53 ` bug (26/26) Brian Grossman
@ 1998-09-08 20:53 ` Brian Grossman
1998-09-08 20:53 ` bug (7/26) Brian Grossman
` (6 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 20:53 UTC (permalink / raw)
To: Alexandre Oliva
273, 274, 275, 69, -1, -1, -1, 73, -1, -1,
283, -1, 166, 79, -1, -1, -1, -1, -1, 41,
86, -1, -1, -1, -1, 91, -1, -1, 182, 183,
-1, 185, 186, 187, 188, 189, 190, 191, 192, -1,
-1, -1, 196, 197, 198, -1, -1, 69, -1, -1,
-1, 73, -1, -1, -1, -1, 166, 79, -1, -1,
-1, -1, -1, -1, 86, -1, -1, -1, -1, 91,
4, 5, 6, 7, 8, 9, 10, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
166, -1, -1, -1, -1, -1, -1, 41, -1, -1,
-1, -1, -1, -1, -1, 269, 270, 271, 272, 273,
274, 275, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 69, -1, -1, -1, 73,
-1, -1, -1, -1, 166, 79, -1, -1, -1, -1,
-1, -1, 86, -1, -1, -1, -1, 91, -1, 269,
270, 271, 272, 273, 274, 275, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
5, 6, 7, 8, 9, 10, -1, -1, -1, -1,
-1, -1, -1, 269, 270, 271, 272, 273, 274, 275,
-1, -1, -1, -1, -1, -1, -1, -1, 4, 5,
6, 7, 8, 9, 10, -1, 41, -1, -1, -1,
-1, -1, 166, 4, 5, 6, 7, 8, 9, 10,
-1, -1, -1, -1, -1, -1, -1, 269, 270, 271,
272, 273, 274, 275, 69, 41, -1, -1, 73, -1,
-1, -1, -1, -1, 79, -1, -1, -1, -1, -1,
41, 86, -1, -1, -1, -1, 91, -1, -1, -1,
-1, -1, -1, 69, -1, -1, -1, 73, -1, -1,
-1, -1, -1, 79, -1, -1, -1, -1, 69, -1,
86, -1, 73, -1, -1, 91, -1, -1, 79, -1,
-1, -1, -1, -1, -1, 86, -1, -1, -1, -1,
91, -1, -1, -1, -1, -1, -1, -1, 4, 5,
6, 7, 8, 9, 10, 269, 270, 271, 272, 273,
274, 275, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 166, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 41, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
166, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 69, -1, 166, -1, 73, -1, -1,
-1, -1, -1, 79, -1, -1, -1, -1, -1, -1,
86, -1, -1, -1, -1, 91, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 269, 270, 271, 272, 273, 274,
275, 30, -1, -1, -1, -1, -1, 36, -1, -1,
-1, -1, -1, -1, 43, -1, -1, -1, 47, -1,
-1, -1, -1, 269, 270, 271, 272, 273, 274, 275,
166, -1, -1, -1, -1, -1, -1, -1, 269, 270,
271, 272, 273, 274, 275, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 85, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
-1, -1, -1, -1, -1, -1, -1, 106, 107, -1,
-1, 36, -1, -1, -1, -1, -1, -1, 43, -1,
-1, 120, 47, -1, -1, -1, -1, -1, -1, -1,
-1, 36, 57, -1, -1, -1, -1, -1, 43, 138,
-1, 66, 47, -1, -1, -1, 145, -1, 147, 148,
-1, -1, -1, -1, -1, -1, 155, -1, -1, -1,
85, 160, -1, 269, 270, 271, 272, 273, 274, 275,
-1, -1, -1, 98, -1, -1, -1, -1, -1, -1,
85, 106, 107, 182, 183, -1, 185, 186, 187, 188,
115, 116, 117, 98, -1, 120, -1, -1, -1, -1,
-1, 106, 107, -1, -1, 36, -1, -1, -1, -1,
-1, -1, 43, 138, -1, 120, 47, -1, -1, -1,
145, -1, 147, 148, -1, -1, -1, -1, -1, -1,
155, -1, -1, 138, -1, 160, -1, -1, -1, -1,
145, -1, 147, 148, -1, -1, -1, -1, -1, -1,
155, -1, -1, -1, 85, 160, -1, 182, 183, -1,
185, 186, 187, 188, -1, -1, -1, 98, -1, -1,
-1, -1, -1, -1, -1, 106, 107, 182, 183, -1,
185, 186, 187, 188, -1, -1, -1, -1, 36, 120,
121, 290, -1, 124, -1, 43, -1, -1, -1, 47,
-1, -1, -1, -1, 36, -1, -1, 138, -1, -1,
-1, 43, -1, -1, 145, 47, 147, 148, -1, -1,
-1, -1, -1, -1, 155, -1, -1, -1, -1, 160,
-1, -1, -1, -1, -1, -1, -1, 85, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
98, 182, 183, 85, 185, 186, 187, 188, 106, 107,
36, -1, -1, -1, -1, 290, 98, 43, -1, -1,
-1, 47, 120, 121, 106, 107, 124, 282, -1, -1,
-1, -1, -1, 288, -1, 290, -1, -1, 120, -1,
138, -1, -1, -1, -1, -1, -1, 145, -1, 147,
148, -1, -1, -1, -1, -1, 138, 155, -1, 85,
-1, -1, 160, 145, -1, 147, 148, -1, -1, -1,
-1, -1, 98, 155, -1, -1, -1, -1, 160, -1,
106, 107, -1, -1, 182, 183, -1, 185, 186, 187,
188, -1, -1, -1, 120, -1, -1, -1, -1, -1,
182, 183, -1, 185, 186, 187, 188, -1, -1, 290,
-1, -1, 138, -1, -1, -1, 36, -1, -1, 145,
-1, 147, 148, 43, -1, -1, -1, 47, -1, 155,
-1, -1, 36, -1, 160, -1, -1, -1, -1, 43,
-1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 182, 183, -1, 185,
186, 187, 188, -1, -1, 85, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 98, -1,
-1, 85, -1, -1, -1, -1, 106, 107, 36, -1,
-1, -1, 290, -1, 98, 43, -1, -1, -1, 47,
120, -1, 106, 107, -1, -1, 288, -1, 290, -1,
-1, -1, -1, -1, -1, -1, 120, -1, 138, -1,
-1, -1, -1, -1, -1, 145, -1, 147, 148, -1,
-1, -1, -1, -1, 138, 155, -1, 85, -1, -1,
160, 145, -1, 147, 148, -1, -1, -1, -1, -1,
98, 155, -1, -1, -1, -1, 160, -1, 106, 107,
-1, -1, 182, 183, 290, 185, 186, 187, 188, -1,
-1, -1, 120, -1, -1, -1, -1, -1, 182, 183,
36, 185, 186, 187, 188, -1, -1, 43, -1, -1,
138, 47, -1, -1, -1, -1, -1, 145, -1, 147,
148, -1, -1, -1, -1, -1, -1, 155, -1, 36,
-1, -1, 160, -1, -1, -1, 43, -1, -1, -1,
47, -1, -1, -1, -1, -1, -1, -1, -1, 85,
-1, -1, -1, -1, 182, 183, -1, 185, 186, 187,
188, -1, 98, -1, -1, -1, -1, -1, -1, -1,
106, 107, -1, -1, -1, -1, -1, -1, 85, -1,
-1, -1, -1, -1, 120, -1, -1, -1, 124, 273,
290, 98, -1, -1, -1, -1, -1, -1, -1, 106,
107, -1, 138, -1, -1, -1, -1, -1, -1, 145,
-1, 147, 148, 120, -1, -1, -1, 124, -1, 155,
-1, -1, -1, -1, 160, -1, -1, -1, -1, -1,
-1, 138, -1, -1, -1, -1, -1, -1, 145, -1,
147, 148, -1, -1, -1, 273, 182, 183, 155, 185,
186, 187, 188, 160, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 182, 183, -1, 185, 186,
187, 188
};
# 2 "/my/gnu/lib/bison/bison.simple"
# 53 "/my/gnu/lib/bison/bison.simple"
# 88 "/my/gnu/lib/bison/bison.simple"
# 126 "/my/gnu/lib/bison/bison.simple"
int yyparse (void);
\f
# 193 "/my/gnu/lib/bison/bison.simple"
\f
# 195 "/my/gnu/lib/bison/bison.simple"
# 211 "/my/gnu/lib/bison/bison.simple"
int
yyparse( )
{
register int yystate;
register int yyn;
register short *yyssp;
register YYSTYPE *yyvsp;
int yyerrstatus;
int yychar1 = 0;
short yyssa[100 ];
YYSTYPE yyvsa[100 ];
short *yyss = yyssa;
YYSTYPE *yyvs = yyvsa;
int yystacksize = 100 ;
int yychar;
YYSTYPE yylval;
int yynerrs;
YYSTYPE yyval;
int yylen;
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = -2 ;
yyssp = yyss - 1;
yyvsp = yyvs;
yynewstate:
*++yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
int size = yyssp - yyss + 1;
# 312 "/my/gnu/lib/bison/bison.simple"
if (my_yyoverflow((
&yyss1 ),(
&yyvs1 ),(
&yystacksize ))) { yyerror( "parser stack overflow" ); return 2; } ;
yyss = yyss1; yyvs = yyvs1;
# 341 "/my/gnu/lib/bison/bison.simple"
yyssp = yyss + size - 1;
yyvsp = yyvs + size - 1;
if (yyssp >= yyss + yystacksize - 1)
return(1) ;
}
goto yybackup;
yybackup:
yyn = yypact[yystate];
if (yyn == -32768 )
goto yydefault;
if (yychar == -2 )
{
yychar = yylex(&yylval) ;
}
if (yychar <= 0)
{
yychar1 = 0;
yychar = 0 ;
}
else
{
yychar1 = ((unsigned)( yychar ) <= 524 ? yytranslate[ yychar ] : 459) ;
# 417 "/my/gnu/lib/bison/bison.simple"
}
yyn += yychar1;
if (yyn < 0 || yyn > 12972 || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == -32768 )
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == 1465 )
return(0) ;
if (yychar != 0 )
yychar = -2 ;
*++yyvsp = yylval;
if (yyerrstatus) yyerrstatus--;
yystate = yyn;
goto yynewstate;
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
yyreduce:
yylen = yyr2[yyn];
if (yylen > 0)
yyval = yyvsp[1-yylen];
# 494 "/my/gnu/lib/bison/bison.simple"
switch (yyn) {
case 1:
# 403 "sql_yacc.yy"
{ send_error(& _current_thd() ->net,1065 ); return(1) ;;
break;}
case 2:
# 404 "sql_yacc.yy"
{;
break;}
case 19:
# 428 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_CREATE_TABLE;
if (!add_table_to_list(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length,__null ))
return(1) ;
_current_lex() ->col_list.empty();
_current_lex() ->change= (char *) 0 ;
;
break;}
case 21:
# 437 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_CREATE_INDEX;
_current_lex() ->unique_flag= (bool) yyvsp[-4].num;
_current_lex() ->col_list.empty();
if (!add_table_to_list(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length,__null ))
return(1) ;
_current_lex() ->change= (char *) 0 ;
;
break;}
case 23:
# 447 "sql_yacc.yy"
{
_current_lex() ->sql_command=SQL_CREATE_DB;
_current_lex() ->name=yyvsp[0].lex_str.str;
;
break;}
case 24:
# 452 "sql_yacc.yy"
{
_current_lex() ->sql_command = SQL_CREATE_FUNCTION;
_current_lex() ->udf.name=yyvsp[0].lex_str.str;
_current_lex() ->udf.name_length=yyvsp[0].lex_str.length;
;
break;}
case 25:
# 458 "sql_yacc.yy"
{
_current_lex() ->udf.returns=(Item_result) yyvsp[-2].num;
_current_lex() ->udf.dl=yyvsp[0].lex_str.str;
;
break;}
case 26:
# 464 "sql_yacc.yy"
{yyval.num = (int) STRING_RESULT; ;
break;}
case 27:
# 465 "sql_yacc.yy"
{yyval.num = (int) REAL_RESULT; ;
break;}
case 28:
# 466 "sql_yacc.yy"
{yyval.num = (int) INT_RESULT; ;
break;}
case 32:
# 476 "sql_yacc.yy"
{
_current_lex() ->col_list.empty();
;
break;}
case 33:
# 480 "sql_yacc.yy"
{
_current_thd() ->key_list.push_back(new Key(yyvsp[-4].key_type,yyvsp[-3].simple_string,_current_lex() ->col_list));
_current_lex() ->col_list.empty();
;
break;}
case 34:
# 485 "sql_yacc.yy"
{
_current_lex() ->col_list.empty();
;
break;}
case 35:
# 489 "sql_yacc.yy"
{
_current_lex() ->col_list.empty();
;
break;}
case 36:
# 494 "sql_yacc.yy"
{ _current_lex() ->length= _current_lex() ->dec=0; _current_lex() ->type=0; _current_lex() ->interval=0;;
break;}
case 37:
# 496 "sql_yacc.yy"
{
if (add_field_to_list(yyvsp[-5].lex_str.str,
(enum enum_field_types) yyvsp[-3].num,
_current_lex() ->length,_current_lex() ->dec,_current_lex() ->type, yyvsp[-1].num, yyvsp[0].num,
yyvsp[-2].item,_current_lex() ->change,_current_lex() ->interval))
return(1) ;
;
break;}
case 38:
# 505 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-1].simple_string; yyval.num=yyvsp[-2].num; ;
break;}
case 39:
# 506 "sql_yacc.yy"
{ yyval.num=yyvsp[-2].num; ;
break;}
case 40:
# 507 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_FLOAT; ;
break;}
case 41:
# 508 "sql_yacc.yy"
{ _current_lex() ->length="1";
yyval.num=FIELD_TYPE_STRING; ;
break;}
case 42:
# 510 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-2].lex_str.str;
yyval.num=FIELD_TYPE_STRING; ;
break;}
case 43:
# 512 "sql_yacc.yy"
{ _current_lex() ->length="1";
yyval.num=FIELD_TYPE_STRING; ;
break;}
case 44:
# 514 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-1].lex_str.str;
_current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_STRING; ;
break;}
case 45:
# 517 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-2].lex_str.str;
yyval.num=FIELD_TYPE_VAR_STRING; ;
break;}
case 46:
# 519 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-1].lex_str.str;
_current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_VAR_STRING; ;
break;}
case 47:
# 522 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_DATE; ;
break;}
case 48:
# 523 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_TIME; ;
break;}
case 49:
# 524 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_TIMESTAMP; ;
break;}
case 50:
# 525 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-1].lex_str.str;
yyval.num=FIELD_TYPE_TIMESTAMP; ;
break;}
case 51:
# 527 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_DATETIME; ;
break;}
case 52:
# 528 "sql_yacc.yy"
{ _current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_TINY_BLOB; ;
break;}
case 53:
# 530 "sql_yacc.yy"
{ _current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_BLOB; ;
break;}
case 54:
# 532 "sql_yacc.yy"
{ _current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_MEDIUM_BLOB; ;
break;}
case 55:
# 534 "sql_yacc.yy"
{ _current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_LONG_BLOB; ;
break;}
case 56:
# 536 "sql_yacc.yy"
{ _current_lex() ->type|= 128 ;
yyval.num=FIELD_TYPE_MEDIUM_BLOB; ;
break;}
case 57:
# 538 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_MEDIUM_BLOB; ;
break;}
case 58:
# 539 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_TINY_BLOB; ;
break;}
case 59:
# 540 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_BLOB; ;
break;}
case 60:
# 541 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_MEDIUM_BLOB; ;
break;}
case 61:
# 543 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-4].lex_str.str; _current_lex() ->dec=yyvsp[-2].lex_str.str;
yyval.num=FIELD_TYPE_DECIMAL;;
break;}
case 62:
# 546 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-4].lex_str.str; _current_lex() ->dec=yyvsp[-2].lex_str.str;
yyval.num=FIELD_TYPE_DECIMAL;;
break;}
case 63:
# 548 "sql_yacc.yy"
{_current_lex() ->interval_list.empty();;
break;}
case 64:
# 549 "sql_yacc.yy"
{
_current_lex() ->interval=typelib(_current_lex() ->interval_list);
yyval.num=FIELD_TYPE_ENUM;
_current_lex() ->interval_list.empty();
;
break;}
case 65:
# 554 "sql_yacc.yy"
{ _current_lex() ->interval_list.empty();;
break;}
case 66:
# 555 "sql_yacc.yy"
{
_current_lex() ->interval=typelib(_current_lex() ->interval_list);
yyval.num=FIELD_TYPE_SET;
_current_lex() ->interval_list.empty();
;
break;}
case 67:
# 562 "sql_yacc.yy"
{;
break;}
case 68:
# 563 "sql_yacc.yy"
{;
break;}
case 69:
# 566 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_LONG; ;
break;}
case 70:
# 567 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_TINY; ;
break;}
case 71:
# 568 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_SHORT; ;
break;}
case 72:
# 569 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_INT24; ;
break;}
case 73:
# 570 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_LONGLONG; ;
break;}
case 74:
# 573 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_DOUBLE; ;
break;}
case 75:
# 574 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_DOUBLE; ;
break;}
case 76:
# 575 "sql_yacc.yy"
{ yyval.num=FIELD_TYPE_DOUBLE; ;
break;}
case 77:
# 579 "sql_yacc.yy"
{;
break;}
case 78:
# 580 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-1].lex_str.str; ;
break;}
case 79:
# 581 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-3].lex_str.str; _current_lex() ->dec=yyvsp[-1].lex_str.str; ;
break;}
case 80:
# 584 "sql_yacc.yy"
{;
break;}
case 81:
# 585 "sql_yacc.yy"
{;
break;}
case 82:
# 588 "sql_yacc.yy"
{;
break;}
case 83:
# 589 "sql_yacc.yy"
{;
break;}
case 84:
# 592 "sql_yacc.yy"
{ _current_lex() ->type|= 32 ;;
break;}
case 85:
# 593 "sql_yacc.yy"
{ _current_lex() ->type|= 32 | 64 ; ;
break;}
case 86:
# 596 "sql_yacc.yy"
{ yyval.simple_string=(char*) 0; ;
break;}
case 87:
# 597 "sql_yacc.yy"
{ yyval.simple_string=yyvsp[-1].lex_str.str; ;
break;}
case 88:
# 600 "sql_yacc.yy"
{;
break;}
case 89:
# 601 "sql_yacc.yy"
{ _current_lex() ->length=yyvsp[-3].lex_str.str; _current_lex() ->dec=yyvsp[-1].lex_str.str; ;
break;}
case 90:
# 604 "sql_yacc.yy"
{ yyval.item = 0; ;
break;}
case 91:
# 605 "sql_yacc.yy"
{ yyval.item = 0; ;
break;}
case 92:
# 606 "sql_yacc.yy"
{ yyval.item = yyvsp[0].item;;
break;}
case 93:
# 607 "sql_yacc.yy"
{ yyval.item = yyvsp[0].item;;
break;}
case 94:
# 608 "sql_yacc.yy"
{ yyval.item = yyvsp[-1].item; ;
break;}
case 95:
# 611 "sql_yacc.yy"
{;
break;}
case 96:
# 612 "sql_yacc.yy"
{ _current_lex() ->type|= 1 ; ;
break;}
case 97:
# 615 "sql_yacc.yy"
{;
break;}
case 98:
# 616 "sql_yacc.yy"
{ _current_lex() ->type|= 128 ; ;
break;}
case 99:
# 619 "sql_yacc.yy"
{ yyval.num= 0; ;
break;}
case 100:
# 620 "sql_yacc.yy"
{ yyval.num= 2 ; ;
break;}
case 101:
# 623 "sql_yacc.yy"
{;
break;}
case 102:
# 625 "sql_yacc.yy"
{
_current_lex() ->col_list.empty();
;
break;}
case 103:
# 630 "sql_yacc.yy"
{;
break;}
case 104:
# 631 "sql_yacc.yy"
{;
break;}
case 105:
# 634 "sql_yacc.yy"
{;
break;}
case 106:
# 635 "sql_yacc.yy"
{;
break;}
case 107:
# 639 "sql_yacc.yy"
{;
break;}
case 108:
# 640 "sql_yacc.yy"
{;
break;}
case 109:
# 641 "sql_yacc.yy"
{;
break;}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (24/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (11 preceding siblings ...)
1998-09-08 20:53 ` bug (13/26) Brian Grossman
@ 1998-09-08 20:53 ` Brian Grossman
1998-09-08 20:53 ` bug (11/26) Brian Grossman
` (9 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 20:53 UTC (permalink / raw)
To: Alexandre Oliva
case 110:
# 642 "sql_yacc.yy"
{;
break;}
case 111:
# 645 "sql_yacc.yy"
{;
break;}
case 112:
# 646 "sql_yacc.yy"
{;
break;}
case 113:
# 647 "sql_yacc.yy"
{;
break;}
case 114:
# 648 "sql_yacc.yy"
{;
break;}
case 115:
# 649 "sql_yacc.yy"
{;
break;}
case 116:
# 652 "sql_yacc.yy"
{ yyval.key_type=Key::PRIMARY; ;
break;}
case 117:
# 653 "sql_yacc.yy"
{ yyval.key_type=Key::MULTIPLE; ;
break;}
case 118:
# 654 "sql_yacc.yy"
{ yyval.key_type=Key::UNIQUE; ;
break;}
case 119:
# 657 "sql_yacc.yy"
{;
break;}
case 120:
# 658 "sql_yacc.yy"
{;
break;}
case 121:
# 661 "sql_yacc.yy"
{ yyval.num= 0; ;
break;}
case 122:
# 662 "sql_yacc.yy"
{ yyval.num= Field::NEXT_NUMBER; ;
break;}
case 123:
# 665 "sql_yacc.yy"
{ yyval.num= 0; ;
break;}
case 124:
# 666 "sql_yacc.yy"
{ yyval.num= 1; ;
break;}
case 125:
# 669 "sql_yacc.yy"
{ _current_lex() ->col_list.push_back(yyvsp[-1].key_part); ;
break;}
case 126:
# 670 "sql_yacc.yy"
{ _current_lex() ->col_list.push_back(yyvsp[-1].key_part); ;
break;}
case 127:
# 673 "sql_yacc.yy"
{ yyval.key_part=new key_part_spec(yyvsp[0].lex_str.str); ;
break;}
case 128:
# 674 "sql_yacc.yy"
{ yyval.key_part=new key_part_spec(yyvsp[-3].lex_str.str,(uint) atoi(yyvsp[-1].lex_str.str)); ;
break;}
case 129:
# 677 "sql_yacc.yy"
{ yyval.simple_string=(char*) 0; ;
break;}
case 130:
# 678 "sql_yacc.yy"
{ yyval.simple_string=yyvsp[0].lex_str.str; ;
break;}
case 131:
# 681 "sql_yacc.yy"
{ _current_lex() ->interval_list.push_back(yyvsp[0].string); ;
break;}
case 132:
# 682 "sql_yacc.yy"
{ _current_lex() ->interval_list.push_back(yyvsp[0].string); ;
break;}
case 133:
# 690 "sql_yacc.yy"
{
_current_lex() ->sql_command = SQL_ALTER_TABLE;
_current_lex() ->name=0;
if (!add_table_to_list(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length,__null ))
return(1) ;
_current_lex() ->drop_primary=0;
_current_lex() ->col_list.empty();
_current_lex() ->drop_list.empty();
_current_lex() ->alter_list.empty();
;
break;}
case 137:
# 708 "sql_yacc.yy"
{ _current_lex() ->change=0;;
break;}
case 139:
# 709 "sql_yacc.yy"
{ _current_lex() ->change= yyvsp[0].lex_str.str; ;
break;}
case 141:
# 711 "sql_yacc.yy"
{ _current_lex() ->drop_list.push_back(new Alter_drop(Alter_drop::COLUMN,
yyvsp[-1].lex_str.str)); ;
break;}
case 142:
# 713 "sql_yacc.yy"
{ _current_lex() ->drop_primary=1; ;
break;}
case 143:
# 714 "sql_yacc.yy"
{;
break;}
case 144:
# 716 "sql_yacc.yy"
{ _current_lex() ->drop_list.push_back(new Alter_drop(Alter_drop::KEY,
yyvsp[0].lex_str.str)); ;
break;}
case 145:
# 719 "sql_yacc.yy"
{ _current_lex() ->alter_list.push_back(new Alter_column(yyvsp[-3].lex_str.str,yyvsp[0].item)); ;
break;}
case 146:
# 721 "sql_yacc.yy"
{ _current_lex() ->alter_list.push_back(new Alter_column(yyvsp[-2].lex_str.str,(Item*) 0)); ;
break;}
case 147:
# 723 "sql_yacc.yy"
{ _current_lex() ->name= yyvsp[0].lex_str.str; ;
break;}
case 148:
# 726 "sql_yacc.yy"
{;
break;}
case 149:
# 727 "sql_yacc.yy"
{;
break;}
case 150:
# 730 "sql_yacc.yy"
{ _current_lex() ->duplicates=DUP_ERROR; ;
break;}
case 151:
# 731 "sql_yacc.yy"
{ _current_lex() ->duplicates=DUP_IGNORE; ;
break;}
case 152:
# 734 "sql_yacc.yy"
{;
break;}
case 153:
# 735 "sql_yacc.yy"
{;
break;}
case 154:
# 736 "sql_yacc.yy"
{;
break;}
case 155:
# 745 "sql_yacc.yy"
{
LEX *lex= _current_lex() ;
lex->where=lex->having=0;
lex->select_limit= _current_thd() ->default_select_limit;
lex->offset_limit=0L;
lex->options=0;
lex->sql_command= SQL_SELECT;
_current_lex() ->exchange = 0;
;
break;}
case 164:
# 771 "sql_yacc.yy"
{ _current_lex() ->options|= 2 ; ;
break;}
case 167:
# 776 "sql_yacc.yy"
{ _current_lex() ->options|= 1 ; ;
break;}
case 170:
# 782 "sql_yacc.yy"
{
if (add_item_to_list(new Item_field(__null ,"*")))
return(1) ;
;
break;}
case 171:
# 790 "sql_yacc.yy"
{
if (add_item_to_list(yyvsp[-2].item))
return(1) ;
if (yyvsp[0].lex_str.str)
yyvsp[-2].item->set_name(yyvsp[0].lex_str.str);
else if (!yyvsp[-2].item->name)
yyvsp[-2].item->set_name(yyvsp[-3].simple_string,(uint) (yyvsp[-1].simple_string - yyvsp[-3].simple_string));
;
break;}
case 172:
# 800 "sql_yacc.yy"
{ yyval.simple_string=(char*) _current_lex() ->tok_start; ;
break;}
case 173:
# 803 "sql_yacc.yy"
{ yyval.simple_string=(char*) _current_lex() ->tok_end; ;
break;}
case 174:
# 806 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 175:
# 807 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 176:
# 810 "sql_yacc.yy"
{ yyval.lex_str.str=0;;
break;}
case 177:
# 811 "sql_yacc.yy"
{ yyval.lex_str=yyvsp[0].lex_str; ;
break;}
case 178:
# 812 "sql_yacc.yy"
{ yyval.lex_str=yyvsp[0].lex_str; ;
break;}
case 179:
# 815 "sql_yacc.yy"
{yyval.item = yyvsp[0].item; ;
break;}
case 180:
# 816 "sql_yacc.yy"
{yyval.item = yyvsp[0].item; ;
break;}
case 181:
# 821 "sql_yacc.yy"
{ yyval.item= new Item_func_in(yyvsp[-4].item,*yyvsp[-1].item_list); ;
break;}
case 182:
# 823 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_in(yyvsp[-5].item,*yyvsp[-1].item_list)); ;
break;}
case 183:
# 825 "sql_yacc.yy"
{ yyval.item= new Item_func_between(yyvsp[-4].item,yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 184:
# 827 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_between(yyvsp[-5].item,yyvsp[-2].item,yyvsp[0].item)); ;
break;}
case 185:
# 828 "sql_yacc.yy"
{ yyval.item= new Item_cond_or(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 186:
# 829 "sql_yacc.yy"
{ yyval.item= new Item_cond_and(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 187:
# 830 "sql_yacc.yy"
{ yyval.item= new Item_func_like(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 188:
# 831 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_like(yyvsp[-3].item,yyvsp[0].item)); ;
break;}
case 189:
# 832 "sql_yacc.yy"
{ yyval.item= new Item_func_regex(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 190:
# 833 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_regex(yyvsp[-3].item,yyvsp[0].item)); ;
break;}
case 191:
# 834 "sql_yacc.yy"
{ yyval.item= new Item_func_isnull(yyvsp[-2].item); ;
break;}
case 192:
# 835 "sql_yacc.yy"
{ yyval.item= new Item_func_isnotnull(yyvsp[-3].item); ;
break;}
case 193:
# 836 "sql_yacc.yy"
{ yyval.item= new Item_func_eq(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 194:
# 837 "sql_yacc.yy"
{ yyval.item= new Item_func_ge(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 195:
# 838 "sql_yacc.yy"
{ yyval.item= new Item_func_gt(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 196:
# 839 "sql_yacc.yy"
{ yyval.item= new Item_func_le(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 197:
# 840 "sql_yacc.yy"
{ yyval.item= new Item_func_lt(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 198:
# 841 "sql_yacc.yy"
{ yyval.item= new Item_func_ne(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 199:
# 842 "sql_yacc.yy"
{ yyval.item= new Item_func_plus(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 200:
# 843 "sql_yacc.yy"
{ yyval.item= new Item_func_minus(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 201:
# 844 "sql_yacc.yy"
{ yyval.item= new Item_func_mul(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 202:
# 845 "sql_yacc.yy"
{ yyval.item= new Item_func_div(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 203:
# 846 "sql_yacc.yy"
{ yyval.item= new Item_func_bit_or(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 204:
# 847 "sql_yacc.yy"
{ yyval.item= new Item_func_bit_and(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 205:
# 848 "sql_yacc.yy"
{ yyval.item= new Item_func_mod(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 206:
# 849 "sql_yacc.yy"
{ yyval.item= yyvsp[-1].item; ;
break;}
case 207:
# 850 "sql_yacc.yy"
{ yyval.item= yyvsp[-1].item; ;
break;}
case 208:
# 855 "sql_yacc.yy"
{ yyval.item= new Item_func_between(yyvsp[-4].item,yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 209:
# 857 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_between(yyvsp[-5].item,yyvsp[-2].item,yyvsp[0].item)); ;
break;}
case 210:
# 858 "sql_yacc.yy"
{ yyval.item= new Item_cond_or(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 211:
# 859 "sql_yacc.yy"
{ yyval.item= new Item_cond_and(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 212:
# 860 "sql_yacc.yy"
{ yyval.item= new Item_func_like(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 213:
# 861 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_like(yyvsp[-3].item,yyvsp[0].item)); ;
break;}
case 214:
# 862 "sql_yacc.yy"
{ yyval.item= new Item_func_regex(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 215:
# 863 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_regex(yyvsp[-3].item,yyvsp[0].item)); ;
break;}
case 216:
# 864 "sql_yacc.yy"
{ yyval.item= new Item_func_isnull(yyvsp[-2].item); ;
break;}
case 217:
# 865 "sql_yacc.yy"
{ yyval.item= new Item_func_isnotnull(yyvsp[-3].item); ;
break;}
case 218:
# 866 "sql_yacc.yy"
{ yyval.item= new Item_func_eq(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 219:
# 867 "sql_yacc.yy"
{ yyval.item= new Item_func_ge(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 220:
# 868 "sql_yacc.yy"
{ yyval.item= new Item_func_gt(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 221:
# 869 "sql_yacc.yy"
{ yyval.item= new Item_func_le(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 222:
# 870 "sql_yacc.yy"
{ yyval.item= new Item_func_lt(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 223:
# 871 "sql_yacc.yy"
{ yyval.item= new Item_func_ne(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 224:
# 872 "sql_yacc.yy"
{ yyval.item= new Item_func_plus(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 225:
# 873 "sql_yacc.yy"
{ yyval.item= new Item_func_minus(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 226:
# 874 "sql_yacc.yy"
{ yyval.item= new Item_func_mul(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 227:
# 875 "sql_yacc.yy"
{ yyval.item= new Item_func_div(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 228:
# 876 "sql_yacc.yy"
{ yyval.item= new Item_func_bit_or(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 229:
# 877 "sql_yacc.yy"
{ yyval.item= new Item_func_bit_and(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 230:
# 878 "sql_yacc.yy"
{ yyval.item= new Item_func_mod(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 231:
# 879 "sql_yacc.yy"
{ yyval.item= yyvsp[-1].item; ;
break;}
case 232:
# 880 "sql_yacc.yy"
{ yyval.item= yyvsp[-1].item; ;
break;}
case 234:
# 886 "sql_yacc.yy"
{ yyval.item= new Item_func_in(yyvsp[-4].item,*yyvsp[-1].item_list); ;
break;}
case 235:
# 888 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_in(yyvsp[-5].item,*yyvsp[-1].item_list)); ;
break;}
case 236:
# 890 "sql_yacc.yy"
{ yyval.item= new Item_func_between(yyvsp[-4].item,yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 237:
# 892 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_between(yyvsp[-5].item,yyvsp[-2].item,yyvsp[0].item)); ;
break;}
case 238:
# 893 "sql_yacc.yy"
{ yyval.item= new Item_cond_or(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 239:
# 894 "sql_yacc.yy"
{ yyval.item= new Item_func_like(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 240:
# 895 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_like(yyvsp[-3].item,yyvsp[0].item)); ;
break;}
case 241:
# 896 "sql_yacc.yy"
{ yyval.item= new Item_func_regex(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 242:
# 897 "sql_yacc.yy"
{ yyval.item= new Item_func_not(new Item_func_regex(yyvsp[-3].item,yyvsp[0].item)); ;
break;}
case 243:
# 898 "sql_yacc.yy"
{ yyval.item= new Item_func_isnull(yyvsp[-2].item); ;
break;}
case 244:
# 899 "sql_yacc.yy"
{ yyval.item= new Item_func_isnotnull(yyvsp[-3].item); ;
break;}
case 245:
# 900 "sql_yacc.yy"
{ yyval.item= new Item_func_eq(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 246:
# 901 "sql_yacc.yy"
{ yyval.item= new Item_func_ge(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 247:
# 902 "sql_yacc.yy"
{ yyval.item= new Item_func_gt(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 248:
# 903 "sql_yacc.yy"
{ yyval.item= new Item_func_le(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 249:
# 904 "sql_yacc.yy"
{ yyval.item= new Item_func_lt(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 250:
# 905 "sql_yacc.yy"
{ yyval.item= new Item_func_ne(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 251:
# 906 "sql_yacc.yy"
{ yyval.item= new Item_func_plus(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 252:
# 907 "sql_yacc.yy"
{ yyval.item= new Item_func_minus(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 253:
# 908 "sql_yacc.yy"
{ yyval.item= new Item_func_mul(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 254:
# 909 "sql_yacc.yy"
{ yyval.item= new Item_func_div(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 255:
# 910 "sql_yacc.yy"
{ yyval.item= new Item_func_bit_or(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 256:
# 911 "sql_yacc.yy"
{ yyval.item= new Item_func_bit_and(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 257:
# 912 "sql_yacc.yy"
{ yyval.item= new Item_func_mod(yyvsp[-2].item,yyvsp[0].item); ;
break;}
case 258:
# 913 "sql_yacc.yy"
{ yyval.item= yyvsp[-1].item; ;
break;}
case 259:
# 914 "sql_yacc.yy"
{ yyval.item= yyvsp[-1].item; ;
break;}
case 264:
# 921 "sql_yacc.yy"
{ yyval.item= new Item_func_neg(yyvsp[0].item); ;
break;}
case 265:
# 922 "sql_yacc.yy"
{ yyval.item= new Item_func_not(yyvsp[0].item); ;
break;}
case 266:
# 923 "sql_yacc.yy"
{ yyval.item= new Item_func_not(yyvsp[0].item); ;
break;}
case 267:
# 924 "sql_yacc.yy"
{ yyval.item= new Item_func_abs(yyvsp[-1].item); ;
break;}
case 268:
# 925 "sql_yacc.yy"
{ yyval.item= new Item_func_ceiling(yyvsp[-1].item); ;
break;}
case 269:
# 926 "sql_yacc.yy"
{ yyval.item= new Item_func_floor(yyvsp[-1].item); ;
break;}
case 270:
# 927 "sql_yacc.yy"
{ yyval.item= new Item_func_round(yyvsp[-1].item,
new Item_int("0",0,1),0); ;
break;}
case 271:
# 929 "sql_yacc.yy"
{ yyval.item= new Item_func_round(yyvsp[-3].item,yyvsp[-1].item,0); ;
break;}
case 272:
# 930 "sql_yacc.yy"
{ yyval.item= new Item_func_round(yyvsp[-3].item,yyvsp[-1].item,1); ;
break;}
case 273:
# 931 "sql_yacc.yy"
{ yyval.item= new Item_func_rand(yyvsp[-1].item); ;
break;}
case 274:
# 932 "sql_yacc.yy"
{ yyval.item= new Item_func_rand(); ;
break;}
case 275:
# 933 "sql_yacc.yy"
{ yyval.item= new Item_func_exp(yyvsp[-1].item); ;
break;}
case 276:
# 934 "sql_yacc.yy"
{ yyval.item= new Item_func_log(yyvsp[-1].item); ;
break;}
case 277:
# 935 "sql_yacc.yy"
{ yyval.item= new Item_func_log10(yyvsp[-1].item); ;
break;}
case 278:
# 936 "sql_yacc.yy"
{ yyval.item= new Item_func_sqrt(yyvsp[-1].item); ;
break;}
case 279:
# 938 "sql_yacc.yy"
{ yyval.item= new Item_func_pow(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 280:
# 939 "sql_yacc.yy"
{ yyval.item= new Item_func_sign(yyvsp[-1].item); ;
break;}
case 281:
# 940 "sql_yacc.yy"
{ yyval.item=new Item_func_bit_count(yyvsp[-1].item); ;
break;}
case 282:
# 942 "sql_yacc.yy"
{ yyval.item= new Item_func_mod(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 283:
# 944 "sql_yacc.yy"
{ yyvsp[-1].item_list->push_front(yyvsp[-3].item); yyval.item= new Item_func_min(*yyvsp[-1].item_list); ;
break;}
case 284:
# 946 "sql_yacc.yy"
{ yyvsp[-1].item_list->push_front(yyvsp[-3].item); yyval.item= new Item_func_max(*yyvsp[-1].item_list); ;
break;}
case 285:
# 948 "sql_yacc.yy"
{ yyval.item= new Item_func_concat(* yyvsp[-1].item_list); ;
break;}
case 286:
# 949 "sql_yacc.yy"
{ yyval.item= new Item_func_reverse(yyvsp[-1].item); ;
break;}
case 287:
# 951 "sql_yacc.yy"
{ yyval.item= new Item_func_replace(yyvsp[-5].item,yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 288:
# 953 "sql_yacc.yy"
{ yyval.item= new Item_func_insert(yyvsp[-7].item,yyvsp[-5].item,yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 289:
# 954 "sql_yacc.yy"
{ yyval.item= new Item_func_lcase(yyvsp[-1].item); ;
break;}
case 290:
# 955 "sql_yacc.yy"
{ yyval.item= new Item_func_ucase(yyvsp[-1].item); ;
break;}
case 291:
# 956 "sql_yacc.yy"
{ yyval.item= new Item_func_length(yyvsp[-1].item); ;
break;}
case 292:
# 958 "sql_yacc.yy"
{ yyval.item= new Item_func_strcmp(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 293:
# 960 "sql_yacc.yy"
{ yyval.item= new Item_func_locate(yyvsp[-1].item,yyvsp[-3].item); ;
break;}
case 294:
# 962 "sql_yacc.yy"
{ yyval.item= new Item_func_locate(yyvsp[-3].item,yyvsp[-5].item,yyvsp[-1].item); ;
break;}
case 295:
# 964 "sql_yacc.yy"
{ yyval.item= new Item_func_locate(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 296:
# 966 "sql_yacc.yy"
{ yyval.item = new Item_func_locate(yyvsp[-1].item,yyvsp[-3].item); ;
break;}
case 297:
# 968 "sql_yacc.yy"
{ yyval.item= new Item_func_left(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 298:
# 970 "sql_yacc.yy"
{ yyval.item= new Item_func_right(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 299:
# 972 "sql_yacc.yy"
{ yyval.item= new Item_func_ltrim(yyvsp[-1].item,new Item_string(" ",1)); ;
break;}
case 300:
# 974 "sql_yacc.yy"
{ yyval.item= new Item_func_rtrim(yyvsp[-1].item,new Item_string(" ",1)); ;
break;}
case 301:
# 976 "sql_yacc.yy"
{ yyval.item= new Item_func_trim(yyvsp[-1].item,new Item_string(" ",1)); ;
break;}
case 302:
# 978 "sql_yacc.yy"
{ yyval.item= new Item_func_ltrim(yyvsp[-1].item,yyvsp[-3].item); ;
break;}
case 303:
# 980 "sql_yacc.yy"
{ yyval.item= new Item_func_rtrim(yyvsp[-1].item,yyvsp[-3].item); ;
break;}
case 304:
# 982 "sql_yacc.yy"
{ yyval.item= new Item_func_trim(yyvsp[-1].item,yyvsp[-3].item); ;
break;}
case 305:
# 984 "sql_yacc.yy"
{ yyval.item= new Item_func_trim(yyvsp[-1].item,yyvsp[-3].item); ;
break;}
case 306:
# 987 "sql_yacc.yy"
{ yyval.item= new Item_func_soundex(yyvsp[-1].item); ;
break;}
case 307:
# 989 "sql_yacc.yy"
{ yyval.item= new Item_func_repeat(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 308:
# 991 "sql_yacc.yy"
{ yyval.item= new Item_func_repeat(new Item_string(" ",1),yyvsp[-1].item); ;
break;}
case 309:
# 993 "sql_yacc.yy"
{ yyval.item= new Item_func_substr(yyvsp[-5].item,yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 310:
# 995 "sql_yacc.yy"
{ yyval.item= new Item_func_substr(yyvsp[-5].item,yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 311:
# 997 "sql_yacc.yy"
{ yyval.item= new Item_func_right(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 312:
# 999 "sql_yacc.yy"
{ yyval.item= new Item_func_substr_index(yyvsp[-5].item,yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 313:
# 1000 "sql_yacc.yy"
{ yyval.item= new Item_func_password(yyvsp[-1].item); ;
break;}
case 314:
# 1001 "sql_yacc.yy"
{ yyval.item= new Item_func_encrypt(yyvsp[-1].item); ;
break;}
case 315:
# 1002 "sql_yacc.yy"
{ yyval.item= new Item_func_encrypt(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 316:
# 1004 "sql_yacc.yy"
{ yyval.item= new Item_func_interval(yyvsp[-3].item,* yyvsp[-1].item_list); ;
break;}
case 317:
# 1006 "sql_yacc.yy"
{ yyval.item= new Item_func_elt(yyvsp[-3].item, *yyvsp[-1].item_list); ;
break;}
case 318:
# 1008 "sql_yacc.yy"
{ yyval.item= new Item_func_field(yyvsp[-3].item, *yyvsp[-1].item_list); ;
break;}
case 319:
# 1010 "sql_yacc.yy"
{ yyval.item= new Item_func_find_in_set(yyvsp[-3].item, yyvsp[-1].item); ;
break;}
case 320:
# 1012 "sql_yacc.yy"
{ yyval.item= new Item_func_period_add(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 321:
# 1014 "sql_yacc.yy"
{ yyval.item= new Item_func_period_diff(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 322:
# 1016 "sql_yacc.yy"
{ yyval.item= new Item_func_to_days(yyvsp[-1].item); ;
break;}
case 323:
# 1018 "sql_yacc.yy"
{ yyval.item= new Item_func_from_days(yyvsp[-1].item); ;
break;}
case 324:
# 1020 "sql_yacc.yy"
{ yyval.item= new Item_func_from_unixtime(yyvsp[-1].item); ;
break;}
case 325:
# 1022 "sql_yacc.yy"
{ yyval.item= new Item_func_date_format(new Item_func_from_unixtime(yyvsp[-3].item),yyvsp[-1].item,0);;
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (13/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (10 preceding siblings ...)
1998-09-08 19:36 ` bug (10/26) Brian Grossman
@ 1998-09-08 20:53 ` Brian Grossman
1998-09-08 20:53 ` bug (24/26) Brian Grossman
` (10 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 20:53 UTC (permalink / raw)
To: Alexandre Oliva
# 43 "../mit-pthreads/include/timers.h" 2
# 40 "../mit-pthreads/include/pthread/cond.h" 2
enum pthread_condtype {
COND_TYPE_FAST,
COND_TYPE_STATIC_FAST,
COND_TYPE_COUNTING_FAST,
COND_TYPE_METERED,
COND_TYPE_DEBUG,
COND_TYPE_MAX
};
typedef struct pthread_cond {
enum pthread_condtype c_type;
struct pthread_queue c_queue;
semaphore c_lock;
void * c_data;
long c_flags;
} pthread_cond_t;
typedef struct pthread_condattr {
enum pthread_condtype c_type;
long c_flags;
} pthread_condattr_t;
extern "C" {
int pthread_cond_init (pthread_cond_t *, const pthread_condattr_t *) ;
int pthread_cond_timedwait (pthread_cond_t *, pthread_mutex_t *,
const struct timespec * abstime) ;
int pthread_cond_wait (pthread_cond_t *, pthread_mutex_t *) ;
int pthread_cond_signal (pthread_cond_t *) ;
int pthread_cond_broadcast (pthread_cond_t *) ;
int pthread_cond_destroy (pthread_cond_t *) ;
};
# 56 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/fd.h" 1
enum fd_type {
FD_NT,
FD_NIU,
FD_HALF_DUPLEX,
FD_FULL_DUPLEX,
FD_TEST_HALF_DUPLEX,
FD_TEST_FULL_DUPLEX
};
union fd_data {
void *ptr;
int i;
};
struct timespec;
struct iovec;
struct fd_ops {
int (*write) (union fd_data, int, const void *,
size_t, struct timespec *) ;
int (*read) (union fd_data, int, void *, size_t,
struct timespec *) ;
int (*close)();
int (*fcntl)();
int (*writev) (union fd_data, int,
const struct iovec *,
int, struct timespec *) ;
int (*readv) (union fd_data, int,
const struct iovec *,
int, struct timespec *) ;
off_t (*seek)();
int use_kfds;
};
struct fd_table_entry {
struct pthread_queue r_queue;
struct pthread_queue w_queue;
struct pthread *r_owner;
struct pthread *w_owner;
pthread_mutex_t mutex;
struct fd_table_entry *next;
struct fd_ops *ops;
enum fd_type type;
int r_lockcount;
int w_lockcount;
int count;
int flags;
union fd_data fd;
};
extern "C" {
};
# 57 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/debug_out.h" 1
# 39 "../mit-pthreads/include/pthread/debug_out.h"
# 58 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/specific.h" 1
struct pthread_key {
pthread_mutex_t mutex;
long count;
void (*destructor)();
};
typedef int pthread_key_t;
extern "C" {
int pthread_key_create (pthread_key_t *, void (*routine)(void *)) ;
int pthread_setspecific (pthread_key_t, const void *) ;
void *pthread_getspecific (pthread_key_t) ;
int pthread_key_delete (pthread_key_t) ;
};
# 61 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/util.h" 1
# 87 "../mit-pthreads/include/pthread/util.h"
# 63 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/pthread_once.h" 1
typedef struct pthread_once {
int state;
pthread_mutex_t mutex;
} pthread_once_t;
extern "C" {
int pthread_once (pthread_once_t *, void (*init_routine)(void)) ;
};
# 66 "../mit-pthreads/include/pthread.h" 2
# 1 "../mit-pthreads/include/pthread/pthread_attr.h" 1
enum schedparam_policy {
SCHED_RR,
SCHED_IO,
SCHED_FIFO,
SCHED_OTHER
};
struct pthread_attr {
enum schedparam_policy schedparam_policy;
int sched_priority;
int flags;
void * arg_attr;
void (*cleanup_attr)();
void * stackaddr_attr;
size_t stacksize_attr;
};
struct sched_param {
int sched_priority;
void * no_data;
};
extern "C" {
typedef struct pthread_attr pthread_attr_t;
int pthread_attr_init (pthread_attr_t *) ;
int pthread_attr_destroy (pthread_attr_t *) ;
int pthread_attr_setstacksize (pthread_attr_t *, size_t) ;
int pthread_attr_getstacksize (pthread_attr_t *, size_t *) ;
int pthread_attr_setstackaddr (pthread_attr_t *, void *) ;
int pthread_attr_getstackaddr (pthread_attr_t *, void **) ;
int pthread_attr_setdetachstate (pthread_attr_t *, int ) ;
int pthread_attr_getdetachstate (pthread_attr_t *, int *) ;
int pthread_attr_setscope (pthread_attr_t *, int ) ;
int pthread_attr_getscope (pthread_attr_t *, int *) ;
int pthread_attr_setinheritsched (pthread_attr_t *, int ) ;
int pthread_attr_getinheritsched (pthread_attr_t *, int *) ;
int pthread_attr_setschedpolicy (pthread_attr_t *, int ) ;
int pthread_attr_getschedpolicy (pthread_attr_t *, int *) ;
int pthread_attr_setschedparam (pthread_attr_t *, struct sched_param *) ;
int pthread_attr_getschedparam (pthread_attr_t *, struct sched_param *) ;
int pthread_attr_setfloatstate (pthread_attr_t *, int ) ;
int pthread_attr_getfloatstate (pthread_attr_t *, int *) ;
int pthread_attr_setcleanup (pthread_attr_t *, void (*routine)(void *),
void *) ;
};
# 69 "../mit-pthreads/include/pthread.h" 2
# 261 "../mit-pthreads/include/pthread.h"
struct pthread;
typedef struct pthread *pthread_t;
# 292 "../mit-pthreads/include/pthread.h"
extern "C" {
# 311 "../mit-pthreads/include/pthread.h"
void pthread_init (void) ;
int pthread_create (pthread_t *,
const pthread_attr_t *,
void * (*start_routine)(void *),
void *) ;
void pthread_exit (void *) ;
pthread_t pthread_self (void) ;
int pthread_equal (pthread_t, pthread_t) ;
int pthread_join (pthread_t, void **) ;
int pthread_detach (pthread_t) ;
void pthread_yield (void) ;
int pthread_setschedparam (pthread_t pthread, int policy,
struct sched_param * param) ;
int pthread_getschedparam (pthread_t pthread, int * policy,
struct sched_param * param) ;
int pthread_kill (struct pthread *, int) ;
void (*pthread_signal (int, void (*)(int)) )();
int pthread_cancel ( pthread_t pthread ) ;
int pthread_setcancelstate ( int state, int *oldstate ) ;
int pthread_setcanceltype ( int type, int *oldtype ) ;
void pthread_testcancel ( void ) ;
int pthread_sigmask (int how, const sigset_t *set,
sigset_t * oset) ;
int sigwait (const sigset_t * set, int * sig) ;
int sigsetwait (const sigset_t * set, int * sig) ;
};
extern struct pthread * pthread_initial;
class __pthread_init_t {
public:
__pthread_init_t() {
if (pthread_initial == __null ) {
pthread_init();
}
}
};
static __pthread_init_t __pthread_init_this_file;
# 16 "../include/my_pthread.h" 2
# 1 "../mit-pthreads/include/sched.h" 1
extern "C" {
int sched_yield (void) ;
int sched_get_priority_max (int) ;
int sched_get_priority_min (int) ;
};
# 24 "../include/my_pthread.h" 2
my_bool my_thread_global_init(void);
extern my_bool my_thread_init(void);
extern void my_thread_end(void);
extern int my_pthread_getprio(pthread_t thread_id);
extern char *my_thread_name(void);
extern long my_thread_id(void);
typedef void *(* pthread_handler)(void *);
# 55 "../include/my_pthread.h"
# 78 "../include/my_pthread.h"
extern void my_pthread_setprio(pthread_t thread_id,int prior);
# 141 "../include/my_pthread.h"
# 230 "../include/my_pthread.h"
# 12 "../include/thr_lock.h" 2
# 1 "../include/list.h" 1
extern "C" {
typedef struct st_list {
struct st_list *prev,*next;
void *data;
} LIST;
typedef int (*list_walk_action)(void *,void *);
extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,pbool free_data);
extern uint list_length(LIST *list);
extern int list_walk(LIST *list,list_walk_action action,gptr argument);
}
# 13 "../include/thr_lock.h" 2
struct st_thr_lock;
typedef struct st_thr_lock_data {
pthread_t thread;
struct st_thr_lock_data *next,**prev;
struct st_thr_lock *lock;
pthread_cond_t *cond;
int type;
ulong thread_id;
} THR_LOCK_DATA;
struct st_lock_list {
THR_LOCK_DATA *data,**last;
};
typedef struct st_thr_lock {
LIST list;
pthread_mutex_t mutex;
struct st_lock_list read_wait;
struct st_lock_list read;
struct st_lock_list write_wait;
struct st_lock_list write;
} THR_LOCK;
my_bool init_thr_lock(void);
void thr_lock_init(THR_LOCK *lock);
void thr_lock_delete(THR_LOCK *lock);
void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data);
int thr_lock(THR_LOCK_DATA *data,int lock_type);
void thr_unlock(THR_LOCK_DATA *data);
void thr_multi_lock(THR_LOCK_DATA **data,uint count);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_print_locks(void);
}
# 20 "mysql_priv.h" 2
extern "C" {
# 1 "../mit-pthreads/include/sys/socket.h" 1
struct sockaddr {
unsigned short sa_family;
char sa_data[14];
};
struct sockproto {
unsigned short sp_family;
unsigned short sp_protocol;
};
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (25/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (18 preceding siblings ...)
1998-09-08 21:44 ` bug (17/26) Brian Grossman
@ 1998-09-08 21:44 ` Brian Grossman
1998-09-08 21:44 ` bug (19/26) Brian Grossman
` (2 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 21:44 UTC (permalink / raw)
To: Alexandre Oliva
break;}
case 326:
# 1024 "sql_yacc.yy"
{ yyval.item= new Item_func_dayofmonth(yyvsp[-1].item); ;
break;}
case 327:
# 1026 "sql_yacc.yy"
{ yyval.item= new Item_func_weekday(new Item_func_to_days(yyvsp[-1].item),0); ;
break;}
case 328:
# 1028 "sql_yacc.yy"
{ yyval.item= new Item_func_weekday(new Item_func_to_days(yyvsp[-1].item),1); ;
break;}
case 329:
# 1030 "sql_yacc.yy"
{ yyval.item= new Item_func_dayname(new Item_func_to_days(yyvsp[-1].item)); ;
break;}
case 330:
# 1032 "sql_yacc.yy"
{ yyval.item= new Item_func_dayofyear(yyvsp[-1].item); ;
break;}
case 331:
# 1034 "sql_yacc.yy"
{ yyval.item= new Item_func_hour(yyvsp[-1].item); ;
break;}
case 332:
# 1036 "sql_yacc.yy"
{ yyval.item= new Item_func_minute(yyvsp[-1].item); ;
break;}
case 333:
# 1038 "sql_yacc.yy"
{ yyval.item= new Item_func_month(yyvsp[-1].item); ;
break;}
case 334:
# 1040 "sql_yacc.yy"
{ yyval.item= new Item_func_monthname(yyvsp[-1].item); ;
break;}
case 335:
# 1042 "sql_yacc.yy"
{ yyval.item= new Item_func_quarter(yyvsp[-1].item); ;
break;}
case 336:
# 1044 "sql_yacc.yy"
{ yyval.item= new Item_func_second(yyvsp[-1].item); ;
break;}
case 337:
# 1046 "sql_yacc.yy"
{ yyval.item= new Item_func_week(yyvsp[-1].item); ;
break;}
case 338:
# 1048 "sql_yacc.yy"
{ yyval.item= new Item_func_year(yyvsp[-1].item); ;
break;}
case 339:
# 1050 "sql_yacc.yy"
{ yyval.item= new Item_func_curdate(); ;
break;}
case 340:
# 1052 "sql_yacc.yy"
{ yyval.item= new Item_func_curdate(); ;
break;}
case 341:
# 1054 "sql_yacc.yy"
{ yyval.item= new Item_func_curtime(); ;
break;}
case 342:
# 1056 "sql_yacc.yy"
{ yyval.item= new Item_func_curtime(); ;
break;}
case 343:
# 1058 "sql_yacc.yy"
{ yyval.item= new Item_func_curtime(yyvsp[-1].item); ;
break;}
case 344:
# 1060 "sql_yacc.yy"
{ yyval.item= new Item_func_now(); ;
break;}
case 345:
# 1062 "sql_yacc.yy"
{ yyval.item= new Item_func_now(); ;
break;}
case 346:
# 1064 "sql_yacc.yy"
{ yyval.item= new Item_func_now(yyvsp[-1].item); ;
break;}
case 347:
# 1066 "sql_yacc.yy"
{ yyval.item= new Item_func_unix_timestamp(); ;
break;}
case 348:
# 1068 "sql_yacc.yy"
{ yyval.item= new Item_func_unix_timestamp(yyvsp[-1].item); ;
break;}
case 349:
# 1070 "sql_yacc.yy"
{ yyval.item= new Item_func_sec_to_time(yyvsp[-1].item); ;
break;}
case 350:
# 1072 "sql_yacc.yy"
{ yyval.item= new Item_func_time_to_sec(yyvsp[-1].item); ;
break;}
case 351:
# 1074 "sql_yacc.yy"
{ yyval.item= new Item_func_date_add_mm(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 352:
# 1076 "sql_yacc.yy"
{ yyval.item= new Item_date_add_interval(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 353:
# 1078 "sql_yacc.yy"
{ yyval.item= new Item_func_user(); ;
break;}
case 354:
# 1080 "sql_yacc.yy"
{ yyval.item= new Item_func_database(); ;
break;}
case 355:
# 1082 "sql_yacc.yy"
{ yyval.item= new Item_func_unique_users(yyvsp[-7].item,atoi(yyvsp[-5].lex_str.str),atoi(yyvsp[-3].lex_str.str), * yyvsp[-1].item_list); ;
break;}
case 356:
# 1084 "sql_yacc.yy"
{ yyval.item= new Item_func_isnull(yyvsp[-1].item); ;
break;}
case 357:
# 1086 "sql_yacc.yy"
{ yyval.item= new Item_func_ifnull(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 358:
# 1088 "sql_yacc.yy"
{ yyval.item= new Item_func_if(yyvsp[-5].item,yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 359:
# 1090 "sql_yacc.yy"
{ yyval.item= new Item_func_format(yyvsp[-3].item,atoi(yyvsp[-1].lex_str.str)); ;
break;}
case 360:
# 1092 "sql_yacc.yy"
{ yyval.item=new Item_func_date_format(yyvsp[-3].item,yyvsp[-1].item,0); ;
break;}
case 361:
# 1094 "sql_yacc.yy"
{ yyval.item=new Item_func_date_format(yyvsp[-3].item,yyvsp[-1].item,1); ;
break;}
case 362:
# 1096 "sql_yacc.yy"
{ yyval.item= new Item_func_ascii(yyvsp[-1].item); ;
break;}
case 363:
# 1098 "sql_yacc.yy"
{ yyval.item= new Item_func_char(*yyvsp[-1].item_list); ;
break;}
case 364:
# 1100 "sql_yacc.yy"
{ yyval.item= new Item_real("PI()",3.14159265358979323846 ,6,8); ;
break;}
case 365:
# 1102 "sql_yacc.yy"
{
yyval.item= new Item_int("last_insert_id()",
_current_thd() ->insert_id(),21);
;
break;}
case 366:
# 1107 "sql_yacc.yy"
{ yyval.item= new Item_func_acos(yyvsp[-1].item); ;
break;}
case 367:
# 1109 "sql_yacc.yy"
{ yyval.item= new Item_func_asin(yyvsp[-1].item); ;
break;}
case 368:
# 1111 "sql_yacc.yy"
{ yyval.item= new Item_func_atan(yyvsp[-1].item); ;
break;}
case 369:
# 1113 "sql_yacc.yy"
{ yyval.item= new Item_func_atan(yyvsp[-3].item,yyvsp[-1].item); ;
break;}
case 370:
# 1115 "sql_yacc.yy"
{ yyval.item= new Item_func_cos(yyvsp[-1].item); ;
break;}
case 371:
# 1117 "sql_yacc.yy"
{ yyval.item= new Item_func_sin(yyvsp[-1].item); ;
break;}
case 372:
# 1119 "sql_yacc.yy"
{ yyval.item= new Item_func_tan(yyvsp[-1].item); ;
break;}
case 373:
# 1121 "sql_yacc.yy"
{ yyval.item= new Item_func_div(new Item_int("1",1,1),
new Item_func_tan(yyvsp[-1].item)); ;
break;}
case 374:
# 1124 "sql_yacc.yy"
{ yyval.item= new Item_string("version()",server_version,
strlen(server_version)); ;
break;}
case 375:
# 1127 "sql_yacc.yy"
{ yyval.item= new Item_func_units("degrees",yyvsp[-1].item,180/ 3.14159265358979323846 ,0.0); ;
break;}
case 376:
# 1129 "sql_yacc.yy"
{ yyval.item= new Item_func_units("radians",yyvsp[-1].item,3.14159265358979323846 /180,0.0); ;
break;}
case 377:
# 1131 "sql_yacc.yy"
{
if (yyvsp[-1].item_list != __null )
yyval.item = new Item_func_udf_str(yyvsp[-3].udf, *yyvsp[-1].item_list);
else
yyval.item = new Item_func_udf_str(yyvsp[-3].udf);
;
break;}
case 378:
# 1138 "sql_yacc.yy"
{
if (yyvsp[-1].item_list != __null )
yyval.item = new Item_func_udf_float(yyvsp[-3].udf, *yyvsp[-1].item_list);
else
yyval.item = new Item_func_udf_float(yyvsp[-3].udf);
;
break;}
case 379:
# 1145 "sql_yacc.yy"
{
if (yyvsp[-1].item_list != __null )
yyval.item = new Item_func_udf_int(yyvsp[-3].udf, *yyvsp[-1].item_list);
else
yyval.item = new Item_func_udf_int(yyvsp[-3].udf);
;
break;}
case 380:
# 1152 "sql_yacc.yy"
{
yyval.item= new Item_func_get_lock(yyvsp[-3].item, yyvsp[-1].item);
;
break;}
case 381:
# 1156 "sql_yacc.yy"
{
yyval.item= new Item_func_release_lock(yyvsp[-1].item);
;
break;}
case 382:
# 1161 "sql_yacc.yy"
{ yyval.item_list= __null ; ;
break;}
case 383:
# 1162 "sql_yacc.yy"
{ yyval.item_list= yyvsp[0].item_list;;
break;}
case 384:
# 1166 "sql_yacc.yy"
{ yyval.item=new Item_sum_avg(yyvsp[-1].item); ;
break;}
case 385:
# 1168 "sql_yacc.yy"
{ yyval.item=new Item_sum_sum(yyvsp[-1].item); ;
break;}
case 386:
# 1170 "sql_yacc.yy"
{ yyval.item=new Item_sum_count(new Item_int((int32) 0L,1)); ;
break;}
case 387:
# 1172 "sql_yacc.yy"
{ yyval.item=new Item_sum_count(yyvsp[-1].item); ;
break;}
case 388:
# 1174 "sql_yacc.yy"
{ yyval.item=new Item_sum_min(yyvsp[-1].item); ;
break;}
case 389:
# 1176 "sql_yacc.yy"
{ yyval.item=new Item_sum_max(yyvsp[-1].item); ;
break;}
case 390:
# 1178 "sql_yacc.yy"
{ yyval.item= new Item_sum_unique_users(yyvsp[-7].item,atoi(yyvsp[-5].lex_str.str),atoi(yyvsp[-3].lex_str.str),yyvsp[-1].item); ;
break;}
case 391:
# 1180 "sql_yacc.yy"
{ yyval.item=new Item_sum_std(yyvsp[-1].item); ;
break;}
case 392:
# 1182 "sql_yacc.yy"
{ yyval.item=new Item_sum_or(yyvsp[-1].item); ;
break;}
case 393:
# 1184 "sql_yacc.yy"
{ yyval.item=new Item_sum_and(yyvsp[-1].item); ;
break;}
case 394:
# 1187 "sql_yacc.yy"
{ _current_lex() ->expr_list.push_front(new List<Item>); ;
break;}
case 395:
# 1189 "sql_yacc.yy"
{ yyval.item_list= _current_lex() ->expr_list.pop(); ;
break;}
case 396:
# 1192 "sql_yacc.yy"
{ _current_lex() ->expr_list.head()->push_back(yyvsp[0].item); ;
break;}
case 397:
# 1193 "sql_yacc.yy"
{ _current_lex() ->expr_list.head()->push_back(yyvsp[0].item); ;
break;}
case 398:
# 1196 "sql_yacc.yy"
{ yyval.item=new Item_string(" ",1); ;
break;}
case 399:
# 1197 "sql_yacc.yy"
{ yyval.item=yyvsp[0].item; ;
break;}
case 400:
# 1200 "sql_yacc.yy"
{ yyval.table_list=yyvsp[-1].table_list; ;
break;}
case 401:
# 1201 "sql_yacc.yy"
{ yyval.table_list=yyvsp[0].table_list; ;
break;}
case 402:
# 1202 "sql_yacc.yy"
{ yyval.table_list=yyvsp[0].table_list ;
break;}
case 403:
# 1203 "sql_yacc.yy"
{ yyval.table_list=yyvsp[0].table_list ;
break;}
case 404:
# 1204 "sql_yacc.yy"
{ yyval.table_list=yyvsp[0].table_list ;
break;}
case 405:
# 1206 "sql_yacc.yy"
{ add_left_join_on(yyvsp[-6].table_list,yyvsp[-2].table_list,yyvsp[0].item); yyval.table_list=yyvsp[-2].table_list; ;
break;}
case 406:
# 1208 "sql_yacc.yy"
{ _current_lex() ->table1=yyvsp[-4].table_list->name; _current_lex() ->table2=yyvsp[0].table_list->name; ;
break;}
case 407:
# 1210 "sql_yacc.yy"
{ add_left_join_on(yyvsp[-9].table_list,yyvsp[-5].table_list,yyvsp[-1].item); yyval.table_list=yyvsp[-5].table_list; ;
break;}
case 408:
# 1212 "sql_yacc.yy"
{ add_left_join_natural(yyvsp[-5].table_list,yyvsp[0].table_list); yyval.table_list=yyvsp[0].table_list; ;
break;}
case 409:
# 1216 "sql_yacc.yy"
{ if (!(yyval.table_list=add_table_to_list(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length,__null ))) return(1) ; ;
break;}
case 410:
# 1218 "sql_yacc.yy"
{ if (!(yyval.table_list=add_table_to_list(yyvsp[-2].lex_str.str, yyvsp[-2].lex_str.length,yyvsp[0].lex_str.str))) return(1) ; ;
break;}
case 411:
# 1220 "sql_yacc.yy"
{ add_left_join_on(yyvsp[-7].table_list,yyvsp[-3].table_list,yyvsp[-1].item); yyval.table_list=yyvsp[-3].table_list; ;
break;}
case 412:
# 1223 "sql_yacc.yy"
{;
break;}
case 413:
# 1224 "sql_yacc.yy"
{;
break;}
case 414:
# 1228 "sql_yacc.yy"
{ if (!(yyval.item= new Item_func_eq(new Item_field(_current_lex() ->table1,yyvsp[0].lex_str.str),
new Item_field(_current_lex() ->table2,yyvsp[0].lex_str.str))))
return(1) ;
;
break;}
case 415:
# 1233 "sql_yacc.yy"
{
if (!(yyval.item= new Item_cond_and(new Item_func_eq(new Item_field(_current_lex() ->table1,yyvsp[0].lex_str.str), new Item_field(_current_lex() ->table2,yyvsp[0].lex_str.str)), yyvsp[-2].item)))
return(1) ;
;
break;}
case 416:
# 1239 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::YEAR);;
break;}
case 417:
# 1240 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::MONTH);;
break;}
case 418:
# 1241 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::DAY);;
break;}
case 419:
# 1242 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::HOUR);;
break;}
case 420:
# 1242 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::MINUTE);;
break;}
case 421:
# 1243 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::SECOND);;
break;}
case 422:
# 1244 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::YEAR_MONTH);;
break;}
case 423:
# 1245 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::DAY_HOUR);;
break;}
case 424:
# 1246 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::DAY_MINUTE);;
break;}
case 425:
# 1247 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::DAY_SECOND);;
break;}
case 426:
# 1248 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::HOUR_MINUTE);;
break;}
case 427:
# 1249 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::HOUR_SECOND);;
break;}
case 428:
# 1250 "sql_yacc.yy"
{ yyval.item=new Item_interval(yyvsp[-1].item,Item_interval::MINUTE_SECOND);;
break;}
case 432:
# 1259 "sql_yacc.yy"
{ _current_lex() ->where= 0; ;
break;}
case 433:
# 1260 "sql_yacc.yy"
{ _current_lex() ->where= yyvsp[0].item; ;
break;}
case 435:
# 1264 "sql_yacc.yy"
{ _current_lex() ->create_refs=1; ;
break;}
case 436:
# 1265 "sql_yacc.yy"
{ _current_lex() ->having= yyvsp[0].item; _current_lex() ->create_refs=0; ;
break;}
case 439:
# 1277 "sql_yacc.yy"
{ if (add_group_to_list(yyvsp[-1].item,(bool) yyvsp[0].num)) return(1) ; ;
break;}
case 440:
# 1279 "sql_yacc.yy"
{ if (add_group_to_list(yyvsp[-1].item,(bool) yyvsp[0].num)) return(1) ; ;
break;}
case 443:
# 1291 "sql_yacc.yy"
{ if (add_order_to_list(yyvsp[-1].item,(bool) yyvsp[0].num)) return(1) ; ;
break;}
case 444:
# 1293 "sql_yacc.yy"
{ if (add_order_to_list(yyvsp[-1].item,(bool) yyvsp[0].num)) return(1) ; ;
break;}
case 445:
# 1296 "sql_yacc.yy"
{ yyval.num = 1; ;
break;}
case 446:
# 1297 "sql_yacc.yy"
{ yyval.num = 1; ;
break;}
case 447:
# 1298 "sql_yacc.yy"
{ yyval.num = 0; ;
break;}
case 448:
# 1303 "sql_yacc.yy"
{
_current_lex() ->select_limit= _current_thd() ->default_select_limit;
_current_lex() ->offset_limit= 0L;
;
break;}
case 449:
# 1308 "sql_yacc.yy"
{ _current_lex() ->select_limit= yyvsp[0].ulong_num; _current_lex() ->offset_limit=0L; ;
break;}
case 450:
# 1310 "sql_yacc.yy"
{ _current_lex() ->select_limit= yyvsp[0].ulong_num; _current_lex() ->offset_limit=yyvsp[-2].ulong_num; ;
break;}
case 451:
# 1313 "sql_yacc.yy"
{ yyval.ulong_num= strtoul(yyvsp[0].lex_str.str,__null ,10); ;
break;}
case 452:
# 1314 "sql_yacc.yy"
{ yyval.ulong_num= strtoul(yyvsp[0].lex_str.str,__null ,10); ;
break;}
case 453:
# 1317 "sql_yacc.yy"
{ yyval.ulonglong_num= (ulonglong) strtoul(yyvsp[0].lex_str.str,__null ,10); ;
break;}
case 454:
# 1318 "sql_yacc.yy"
{ yyval.ulonglong_num= strtoull(yyvsp[0].lex_str.str,__null ,10); ;
break;}
case 455:
# 1319 "sql_yacc.yy"
{ yyval.ulonglong_num= strtoull(yyvsp[0].lex_str.str,__null ,10); ;
break;}
case 457:
# 1324 "sql_yacc.yy"
{
if (add_proc_to_list(new Item_field(__null ,yyvsp[0].lex_str.str)))
return(1) ;
;
break;}
case 461:
# 1337 "sql_yacc.yy"
{
if (add_proc_to_list(yyvsp[0].item))
return(1) ;
if (!yyvsp[0].item->name)
yyvsp[0].item->set_name(yyvsp[-1].simple_string,(uint) ((char*) _current_lex() ->tok_end - yyvsp[-1].simple_string));
;
break;}
case 462:
# 1346 "sql_yacc.yy"
{
if (!(_current_lex() ->exchange= new sql_exchange(yyvsp[0].lex_str.str)))
return(1) ;
;
break;}
case 464:
# 1358 "sql_yacc.yy"
{
_current_lex() ->sql_command = SQL_DROP_TABLE;
;
break;}
case 465:
# 1361 "sql_yacc.yy"
{;
break;}
case 466:
# 1362 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_DROP_INDEX; ;
break;}
case 467:
# 1363 "sql_yacc.yy"
{;
break;}
case 468:
# 1364 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_DROP_INDEX; ;
break;}
case 469:
# 1366 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_DROP_DB; _current_lex() ->name=yyvsp[0].lex_str.str; ;
break;}
case 470:
# 1368 "sql_yacc.yy"
{
_current_lex() ->sql_command = SQL_DROP_FUNCTION;
_current_lex() ->udf.name=yyvsp[0].lex_str.str;
;
break;}
case 473:
# 1379 "sql_yacc.yy"
{ if (!add_table_to_list(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length,__null )) return(1) ; ;
break;}
case 474:
# 1386 "sql_yacc.yy"
{ _current_lex() ->sql_command = SQL_INSERT; ;
break;}
case 476:
# 1389 "sql_yacc.yy"
{ _current_lex() ->sql_command = SQL_REPLACE; ;
break;}
case 478:
# 1393 "sql_yacc.yy"
{
_current_thd() ->field_list.empty();
;
break;}
case 480:
# 1399 "sql_yacc.yy"
{;
break;}
case 481:
# 1401 "sql_yacc.yy"
{
LEX *lex= _current_lex() ;
lex->where=lex->having=0;
lex->select_limit= _current_thd() ->default_select_limit;
lex->offset_limit=0L;
lex->options=0;
lex->sql_command = (lex->sql_command == SQL_INSERT ?
SQL_INSERT_SELECT : SQL_REPLACE_SELECT);
;
break;}
case 482:
# 1410 "sql_yacc.yy"
{;
break;}
case 483:
# 1413 "sql_yacc.yy"
{ ;
break;}
case 484:
# 1414 "sql_yacc.yy"
{ ;
break;}
case 485:
# 1417 "sql_yacc.yy"
{ _current_thd() ->field_list.push_back(yyvsp[0].item); ;
break;}
case 486:
# 1418 "sql_yacc.yy"
{ _current_thd() ->field_list.push_back(yyvsp[0].item); ;
break;}
case 487:
# 1422 "sql_yacc.yy"
{ if (add_value_to_list(yyvsp[0].item)) return(1) ; ;
break;}
case 488:
# 1423 "sql_yacc.yy"
{ if (add_value_to_list(yyvsp[0].item)) return(1) ; ;
break;}
case 489:
# 1430 "sql_yacc.yy"
{ _current_lex() ->sql_command = SQL_UPDATE; ;
break;}
case 490:
# 1434 "sql_yacc.yy"
{
if (add_item_to_list(yyvsp[-2].item) || add_value_to_list(yyvsp[0].item))
return(1) ;
;
break;}
case 491:
# 1439 "sql_yacc.yy"
{
if (add_item_to_list(yyvsp[-2].item) || add_value_to_list(yyvsp[0].item))
return(1) ;
;
break;}
case 492:
# 1449 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_DELETE; ;
break;}
case 493:
# 1454 "sql_yacc.yy"
{ _current_lex() ->wild=0;;
break;}
case 495:
# 1458 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_SHOW_DATABASES; ;
break;}
case 496:
# 1460 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_SHOW_TABLES; ;
break;}
case 497:
# 1462 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_SHOW_FIELDS;
if (!add_table_to_list(yyvsp[-2].lex_str.str,yyvsp[-2].lex_str.length,__null ))
return(1) ;
;
break;}
case 498:
# 1468 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_SHOW_KEYS;
if (!add_table_to_list(yyvsp[-1].lex_str.str,yyvsp[-1].lex_str.length,__null ))
return(1) ;
;
break;}
case 499:
# 1474 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_SHOW_KEYS;
if (!add_table_to_list(yyvsp[-1].lex_str.str,yyvsp[-1].lex_str.length,__null ))
return(1) ;
;
break;}
case 500:
# 1480 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_SHOW_STATUS; ;
break;}
case 501:
# 1482 "sql_yacc.yy"
{ _current_lex() ->sql_command= SQL_SHOW_VARIABLES; ;
break;}
case 502:
# 1486 "sql_yacc.yy"
{ _current_lex() ->db = _current_thd() ->db; ;
break;}
case 503:
# 1487 "sql_yacc.yy"
{ _current_lex() ->db = yyvsp[0].lex_str.str; ;
break;}
case 505:
# 1491 "sql_yacc.yy"
{ _current_lex() ->wild= yyvsp[0].string; ;
break;}
case 506:
# 1496 "sql_yacc.yy"
{
_current_lex() ->wild=0;
_current_lex() ->sql_command=SQL_SHOW_FIELDS;
_current_lex() ->db= _current_thd() ->db;
if (!add_table_to_list(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length,__null ))
return(1) ;
;
break;}
case 508:
# 1504 "sql_yacc.yy"
{ _current_lex() ->options|= 4 ;
break;}
case 511:
# 1512 "sql_yacc.yy"
{;
break;}
case 512:
# 1513 "sql_yacc.yy"
{ _current_lex() ->wild= yyvsp[0].string; ;
break;}
case 513:
# 1514 "sql_yacc.yy"
{ _current_lex() ->wild= new String((const char*) yyvsp[0].lex_str.str,yyvsp[0].lex_str.length); ;
break;}
case 514:
# 1519 "sql_yacc.yy"
{ _current_lex() ->sql_command=SQL_CHANGE_DB; _current_lex() ->db=yyvsp[0].lex_str.str; ;
break;}
case 515:
# 1524 "sql_yacc.yy"
{
_current_lex() ->sql_command= SQL_LOAD;
if (!(_current_lex() ->exchange= new sql_exchange(yyvsp[0].lex_str.str)))
return(1) ;
_current_thd() ->field_list.empty();
;
break;}
case 516:
# 1532 "sql_yacc.yy"
{
if (!add_table_to_list(yyvsp[-4].lex_str.str,yyvsp[-4].lex_str.length,__null ))
return(1) ;
;
break;}
case 517:
# 1538 "sql_yacc.yy"
{ _current_lex() ->duplicates=DUP_ERROR; ;
break;}
case 518:
# 1539 "sql_yacc.yy"
{ _current_lex() ->duplicates=DUP_REPLACE; ;
break;}
case 519:
# 1540 "sql_yacc.yy"
{ _current_lex() ->duplicates=DUP_IGNORE; ;
break;}
case 524:
# 1551 "sql_yacc.yy"
{ _current_lex() ->exchange->field_term= yyvsp[0].string;;
break;}
case 525:
# 1553 "sql_yacc.yy"
{ _current_lex() ->exchange->enclosed= yyvsp[0].string; _current_lex() ->exchange->opt_enclosed=1;;
break;}
case 526:
# 1554 "sql_yacc.yy"
{ _current_lex() ->exchange->enclosed= yyvsp[0].string;;
break;}
case 527:
# 1555 "sql_yacc.yy"
{ _current_lex() ->exchange->escaped= yyvsp[0].string;;
break;}
case 532:
# 1566 "sql_yacc.yy"
{ _current_lex() ->exchange->line_term= yyvsp[0].string;;
break;}
case 533:
# 1567 "sql_yacc.yy"
{ _current_lex() ->exchange->line_start= yyvsp[0].string;;
break;}
case 535:
# 1572 "sql_yacc.yy"
{ _current_lex() ->exchange->skip_lines=atol(yyvsp[-1].lex_str.str); ;
break;}
case 536:
# 1577 "sql_yacc.yy"
{ yyval.item = new Item_string(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length); ;
break;}
case 537:
# 1579 "sql_yacc.yy"
{ ((Item_string*) yyvsp[-1].item)->append(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length); ;
break;}
case 538:
# 1583 "sql_yacc.yy"
{ yyval.string= new String(yyvsp[0].lex_str.str,yyvsp[0].lex_str.length); ;
break;}
case 539:
# 1586 "sql_yacc.yy"
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (19/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (19 preceding siblings ...)
1998-09-08 21:44 ` bug (25/26) Brian Grossman
@ 1998-09-08 21:44 ` Brian Grossman
1998-09-08 21:44 ` bug (18/26) Brian Grossman
1998-09-08 21:44 ` bug (16/26) Brian Grossman
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 21:44 UTC (permalink / raw)
To: Alexandre Oliva
public:
Item *item;
Item_copy_string(Item *i) :item(i)
{
null_value=maybe_null=item->maybe_null;
decimals=item->decimals;
max_length=item->max_length;
name=item->name;
}
~Item_copy_string() { delete item; }
enum Type type() const { return COPY_STR_ITEM; }
enum Item_result result_type () const { return STRING_RESULT; }
double val() { return 0.0; }
longlong val_int() { return 0; }
String *str(String*);
void make_field(Send_field *field) { item->make_field(field); }
void copy();
table_map used_tables() const { return (table_map) 1L; }
};
class Item_buff :public Sql_alloc {
public:
my_bool null_value;
Item_buff() :null_value(0) {}
virtual bool cmp(void)=0;
virtual ~Item_buff();
};
class Item_str_buff :public Item_buff
{
Item *item;
String value,tmp_value;
public:
Item_str_buff(Item *arg) :item(arg),value(arg->max_length) {}
bool cmp(void);
~Item_str_buff();
};
class Item_real_buff :public Item_buff
{
Item *item;
double value;
public:
Item_real_buff(Item *item_par) :item(item_par),value(0.0) {}
bool cmp(void);
};
class Item_int_buff :public Item_buff
{
Item *item;
longlong value;
public:
Item_int_buff(Item *item_par) :item(item_par),value(0) {}
bool cmp(void);
};
class Item_field_buff :public Item_buff
{
char *buff;
Field *field;
uint length;
public:
Item_field_buff(Item_field *item)
{
field=item->field;
buff= (char*) sql_calloc(length=field->pack_length());
}
bool cmp(void);
};
extern Item_buff *new_Item_buff(Item *item);
extern Item_result item_cmp_type(Item_result a,Item_result b);
extern Item *resolve_const_item(Item *item,Item *cmp_item);
# 132 "mysql_priv.h" 2
# 1 "sql_class.h" 1
#pragma interface
enum enum_duplicates { DUP_ERROR, DUP_REPLACE, DUP_IGNORE };
enum timestamp_type { TIMESTAMP_NONE, TIMESTAMP_DATE, TIMESTAMP_FULL };
class MYSQL_LOG {
public:
enum type { CLOSED, NORMAL, NEW };
FILE *file;
time_t last_time,query_start;
ulonglong last_insert_id;
type log_type;
char *name;
char time_buff[20],db[64 +1];
public:
MYSQL_LOG() :file(0),last_time(0),query_start(0),last_insert_id(0),name(0),
log_type(CLOSED) {}
void open(const my_string log_name,type log_type);
void new_file();
void write(enum enum_server_command command,const my_string format,...);
void write(const char *query);
void flush();
void close();
};
class CONVERT
{
const uchar *from_map,*to_map;
void convert_array(const uchar *mapping,uchar *buff,uint length);
public:
const my_string name;
CONVERT(my_string name_par,uchar *from_par,uchar *to_par)
:name(name_par),from_map(from_par),to_map(to_par) {}
friend CONVERT *get_convert_set(const char *name_ptr);
inline void convert(char *a,uint length)
{
convert_array(from_map, (uchar*) a,length);
}
bool store(String *, const char *,uint);
};
typedef struct st_copy_info {
ulong records;
ulong deleted;
ulong copied;
enum enum_duplicates handle_duplicates;
int escape_char;
} COPY_INFO;
class key_part_spec :public Sql_alloc {
public:
char *field_name;
uint length;
key_part_spec(char *name,uint len=0) :field_name(name), length(len) {}
};
class Alter_drop :public Sql_alloc {
public:
enum drop_type {KEY, COLUMN };
char *name;
enum drop_type type;
Alter_drop(enum drop_type par_type,char *par_name)
:name(par_name), type(par_type) {}
};
class Alter_column :public Sql_alloc {
public:
char *name;
Item *def;
Alter_column(char *par_name,Item *literal)
:name(par_name), def(literal) {}
};
class Key :public Sql_alloc {
public:
enum Keytype { PRIMARY, UNIQUE, MULTIPLE };
enum Keytype type;
List<key_part_spec> columns;
char *Name;
Key(enum Keytype type_par,char *name,List<key_part_spec> &cols)
:type(type_par), columns(cols),Name(name) {}
~Key() {}
char *name() { return Name; }
};
typedef struct st_mysql_lock
{
TABLE **table;
uint table_count,lock_count;
THR_LOCK_DATA **locks;
} MYSQL_LOCK;
extern uint thd_startup_options;
class THD :public ilink {
time_t start_time;
ulonglong last_insert_id;
public:
NET net;
char *host,*user,*priv_user,*db,*ip,*proc_info;
struct sockaddr_in local,remote;
uint client_capabilities,max_packet_length;
uint master_access,db_access;
TABLE *open_tables;
MYSQL_LOCK *lock,*locked_tables;
MEM_ROOT alloc;
ULL *ull;
pthread_cond_t *cond;
enum enum_server_command command;
char *query,*where,*thread_stack;
uint current_tablenr,select_distinct,tmp_table,cond_count,options;
ulong thread_id,query_id,version,select_limit,default_select_limit,
offset_limit, cuted_fields;
List<Item> item_list,field_list,value_list;
List<Key> key_list;
List<create_field> create_list;
Item *free_list;
SQL_LIST order_list,table_list,group_list,proc_list;
CONVERT *convert_set;
Field *dupp_field;
String packet;
bool set_query_id,locked,count_cuted_fields,some_tables_deleted;
bool no_errors, allow_sum_func, password, fatal_error;
bool query_start_used,last_insert_id_used,insert_id_used,user_time;
bool volatile killed;
int* mysys_abort_flag;
struct rand_struct rand;
pthread_t real_id;
sigset_t signals,block_signals;
THD()
{
host=user=db=query=ip=proc_info=0;
locked=killed=count_cuted_fields=some_tables_deleted=no_errors=password=
fatal_error=query_start_used=last_insert_id_used=insert_id_used=
user_time=0;
last_insert_id=0;
open_tables=0;
lock=locked_tables=0;
cuted_fields=0L;
options=thd_startup_options;
start_time=(time_t) 0;
cond_count=0;
command=COM_SLEEP;
set_query_id=1;
default_select_limit= (ulong) ~0L;
convert_set=0;
mysys_abort_flag=0;
db_access= 16384 ;
ull=0;
cond=0;
}
~THD();
inline time_t query_start() { query_start_used=1; return start_time; }
inline void set_time() { if (!user_time) time(&start_time); }
inline void set_time(time_t t) { start_time=t; user_time=1; }
inline void insert_id(ulonglong id)
{ last_insert_id=id; insert_id_used=1; }
inline ulonglong insert_id(void)
{
last_insert_id_used=1; return last_insert_id;
}
};
class sql_exchange :public Sql_alloc
{
public:
char *file_name;
String *field_term,*enclosed,*line_term,*line_start,*escaped;
bool opt_enclosed;
uint skip_lines;
sql_exchange(char *name);
~sql_exchange() {}
};
class select_result :public Sql_alloc {
protected:
THD *thd;
public:
select_result();
virtual ~select_result() {};
virtual int prepare(List<Item> &list ) { return 0; }
virtual bool send_fields(List<Item> &list,uint flag)=0;
virtual bool send_data(List<Item> &items)=0;
virtual void send_error(uint errcode,char *err)=0;
virtual void send_eof()=0;
};
class select_send :public select_result {
public:
select_send() {}
bool send_fields(List<Item> &list,uint flag);
bool send_data(List<Item> &items);
void send_error(uint errcode,char *err);
void send_eof();
};
class select_export :public select_result {
sql_exchange *exchange;
File file;
IO_CACHE cache;
ulong row_count;
uint field_term_length;
int field_sep_char,escape_char,line_sep_char;
bool fixed_row_size;
public:
select_export(sql_exchange *ex) :exchange(ex),file(-1),row_count(0L) {}
~select_export();
int prepare(List<Item> &list);
bool send_fields(List<Item> &list ,
uint flag ) { return 0; }
bool send_data(List<Item> &items);
void send_error(uint errcode,char *err);
void send_eof();
};
class select_insert :public select_result {
TABLE *table;
List<Item> *fields;
uint save_time_stamp;
COPY_INFO info;
public:
select_insert(TABLE *table_par,List<Item> *fields_par,enum_duplicates dup)
:table(table_par),fields(fields_par),save_time_stamp(table_par->time_stamp)
{
memset(( (gptr) &info ),0,( sizeof(info) )) ; info.handle_duplicates=dup;
}
~select_insert();
int prepare(List<Item> &list);
bool send_fields(List<Item> &list,uint flag) { return 0; }
bool send_data(List<Item> &items);
void send_error(uint errcode,char *err);
void send_eof();
};
typedef struct st_sort_field {
Field *field;
Item *item;
uint length;
my_bool reverse;
Item_result result_type;
} SORT_FIELD;
typedef struct st_sort_buffer {
uint index;
uint sort_orders;
uint change_pos;
char **buff;
SORT_FIELD *sortorder;
} SORT_BUFFER;
# 133 "mysql_priv.h" 2
# 1 "handler.h" 1
extern char bas_ext[][2][20 ];
extern uint ha_maxrecordlength[], ha_max_keys[],
ha_max_key_parts[], ha_option_flag[],ha_max_key_length;
extern int ha_panic(enum ha_panic_function flag);
extern int ha_open(TABLE *form,char *name,int mode,int test_if_locked);
extern int ha_close(TABLE *form);
extern int ha_write(TABLE *form,byte *buf);
extern int ha_update(TABLE *form,byte *old,byte *new_record);
extern int ha_delete(TABLE *form,byte *buf);
extern int ha_rkey(TABLE *form,byte *buf,int inx,byte *key,
uint key_len,enum ha_rkey_function flag);
extern int ha_rnext(TABLE *form,byte *buf,int inx);
extern int ha_rprev(TABLE *form,byte *buf,int inx);
extern int ha_rfirst(TABLE *form,byte *buf,int inx);
extern int ha_rlast(TABLE *form,byte *buf,int inx);
extern int ha_rsame(TABLE *form,byte *buf,int inx);
extern int ha_rsame_with_pos(TABLE *form,byte *buf,int inx,byte *pos);
extern int ha_r_rnd(TABLE *form,byte *buf,byte *pos);
extern int ha_readfirst(TABLE *form,byte *buf);
extern void ha_info(TABLE *form,int flag);
extern int ha_extra(TABLE *form,enum ha_extra_function function);
extern void ha_reset(TABLE *form);
extern int ha_lock(TABLE *form,int lock_type);
extern void ha_key_cache(void);
extern void ha_error(TABLE *form,int error,int errflag);
extern int ha_keyerror(TABLE *form,int error);
extern enum db_type ha_checktype(enum db_type database_type);
extern int ha_frename(enum db_type base,char *from,char *to);
extern int ha_frename (enum db_type base, const char * from, const char * to);
extern int ha_fdelete(enum db_type base,char *name);
# 134 "mysql_priv.h" 2
# 1 "select.h" 1
#pragma interface
typedef struct st_key_part {
uint16 key,part,length;
Field *field;
} KEY_PART;
class QUICK_RANGE :public Sql_alloc {
public:
char *min_key,*max_key;
uint16 min_length,max_length,flag;
QUICK_RANGE(const char *min_key_arg,uint min_length_arg,
const char *max_key_arg,uint max_length_arg,
uint flag_arg)
: min_key(sql_memdup(min_key_arg,min_length_arg+1)),
max_key(sql_memdup(max_key_arg,max_length_arg+1)),
min_length(min_length_arg),
max_length(max_length_arg),
flag(flag_arg)
{}
};
class QUICK_SELECT {
public:
bool next;
uint index;
TABLE *head;
List<QUICK_RANGE> ranges;
List_iterator<QUICK_RANGE> it;
MEM_ROOT alloc;
KEY_PART *key_parts;
ulong records;
QUICK_SELECT(uint index_arg);
~QUICK_SELECT();
void reset(void) { next=0; it.rewind(); }
int get_next();
int cmp(QUICK_RANGE *range);
};
class SQL_SELECT :public Sql_alloc {
public:
QUICK_SELECT *quick;
COND *cond;
TABLE **tables,*head;
IO_CACHE file;
ulong records;
key_map quick_keys;
table_map needed_reg;
table_map const_tables,read_tables;
bool free_cond;
SQL_SELECT();
~SQL_SELECT();
bool check_quick() { return test_quick_select(~0L,0,~0L) < 0; }
bool skipp_record() { return cond ? cond->val_int() == 0 : 0; }
int test_quick_select(key_map keys,table_map prev_tables,ulong limit);
};
# 135 "mysql_priv.h" 2
typedef List<Item> List_item;
void mysql_create_db(THD *thd, char *db);
int mysql_rm_table(THD *thd, TABLE_LIST *tables);
bool mysql_change_db(THD *thd,const char *name);
void mysql_parse(THD *thd,char *inBuf,uint length);
void * handle_one_connection (void * arg ) ;
sig_handler end_thread(int sig);
void mysql_execute_command(void);
bool do_command(THD *thd);
bool check_stack_overrun(THD *thd,char *dummy);
void reload_acl_and_cache(uint options);
void mysql_rm_db(THD *thd,char *db);
void table_cache_init(void);
void table_cache_free(void);
uint cached_tables(void);
void close_connection(NET *net,uint errcode=0,bool lock=1);
void send_error(NET *net,uint sql_errno=0, char *err=0);
void net_printf(NET *net,uint sql_errno, ...);
void send_ok(NET *net,ulong affected_rows=0L,ulong id=0L,const char *info=0);
void send_eof(NET *net,bool no_flush=0);
byte *net_store_length(byte *packet,ulong length);
byte *net_store_data(byte *to,const char *from);
byte *net_store_data(byte *to,long from);
bool net_store_null(String *packet);
bool net_store_data(String *packet,ulong from);
bool net_store_data(String *packet,const char *from);
bool net_store_data(String *packet,const byte *from,uint length);
int mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &list,COND *conds,
ORDER *order, ORDER *group,Item *having,ORDER *proc_param,
uint select_type,select_result *result);
int mysql_create_table(THD *thd,const char *table_name,
List<create_field> &fields, List<Key> &keys,
bool tmp_table);
int mysql_alter_table(THD *thd, char *new_name, TABLE_LIST *table_list,
List<create_field> &fields,
List<Key> &keys,List<Alter_drop> &drop_list,
List<Alter_column> &alter_list,
bool drop_primary,enum enum_duplicates handle_duplicates);
int mysql_create_index(THD *thd,const char *table_name,List<key_part_spec> &key,
bool unique);
int mysql_update(THD *thd,TABLE_LIST *tables,List<Item> &fields,
List<Item> &values,COND *conds);
int mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields,
List<Item> &values, enum_duplicates flag);
int mysql_delete(THD *thd,TABLE_LIST *table,COND *conds);
TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, bool update);
TABLE *open_table(THD *thd,const char *db,const char *table,const char *alias);
bool reopen_table(THD *thd,TABLE *table,bool locked=0);
bool reopen_tables(THD *thd,const char *table_name);
Field *find_field_in_tables(THD *thd,Item_field *item,TABLE_LIST *tables);
int mysqld_show_dbs(THD *thd,const char *wild);
int mysqld_show_tables(THD *thd,const char *db,const char *wild);
int mysqld_show_fields(THD *thd,const char *db,const char *table,
const char *wild);
int mysqld_show_keys(THD *thd,const char *db,const char *table);
void mysqld_list_fields(THD *thd,const char *table,const char *wild);
void mysqld_list_processes(THD *thd);
int mysqld_show_status(THD *thd);
int mysqld_show_variables(THD *thd,const char *wild);
int acl_init(void);
void acl_reload(void);
void acl_free(void);
uint acl_get(const char *host, const char *ip, const char *user,
const char *db);
uint acl_getroot(const char *host, const char *ip, const char *user,
const char *password,const char *scramble,char **priv_user,
bool old_ver);
uint acl_getconnectright(const char *host, const char *ip);
void set_item_name(Item *item,char *pos,uint length);
bool add_field_to_list(char *field_name, enum enum_field_types type,
char *length, char *decimal,
uint type_modifier,int unireg_check,
int keyinfo,Item *item,char *change,
TYPELIB *interval);
bool add_to_list(SQL_LIST &list,Item *group,bool asc=0);
TABLE_LIST *add_table_to_list(char *name,uint length,char *alias,uint flags=0);
void add_left_join_on(TABLE_LIST *a,TABLE_LIST *b,Item *expr);
void add_left_join_natural(TABLE_LIST *a,TABLE_LIST *b);
bool add_proc_to_list(Item *item);
TABLE *unlink_open_table(TABLE *list,TABLE *find);
ulong get_quick_record_count(SQL_SELECT *select,uint table,uint keys);
SQL_SELECT *make_select(TABLE **table,uint table_count,uint head,
uint const_tables, COND *conds, int *error);
Item ** find_item_in_list(Item *item,List<Item> &items);
int setup_fields(THD *thd,TABLE_LIST *tables,List<Item> &item,
bool set_query_id,List<Item> *sum_func_list);
int setup_conds(THD *thd,TABLE_LIST *tables,COND *conds);
int open_tables(THD *thd,TABLE_LIST *tables);
int open_and_lock_tables(THD *thd,TABLE_LIST *tables);
int lock_tables(THD *thd,TABLE_LIST *tables);
TABLE *open_tmp_table(THD *thd,const char *db,const char *table_name);
bool send_fields(THD *thd,List<Item> &item,uint send_field_count);
void free_io_cache(TABLE *entry);
void intern_close_table(TABLE *entry);
void close_thread_tables(THD *thd);
void remove_db_from_cache(const my_string db);
bool remove_table_from_cache(const char *db,const char *table);
void close_cached_tables(bool wait_for_refresh);
void copy_field_from_tmp_record(Field *field,int offset);
int fill_record(List<Item> &fields,List<Item> &values);
int fill_record(TABLE *table,List<Item> &values);
bool eval_const_cond(COND *cond);
int mysql_load(THD *thd,sql_exchange *ex, TABLE_LIST *table_list,
List<Item> &fields, enum enum_duplicates handle_duplicates);
int write_record(THD *thd,TABLE *table,COPY_INFO *info);
int find_ref_key(TABLE *form,Field *field);
void key_copy(byte *key,TABLE *form,uint index,uint key_length);
void key_restore(TABLE *form,byte *key,uint index,uint key_length);
int key_cmp(TABLE *form,byte *key,uint index,uint key_length);
void key_unpack(String *to,TABLE *form,uint index);
void init_errmessage(void);
extern char mysql_data_home[512 ],server_version[40],max_sort_char;
extern my_string mysql_unix_port,mysql_tmpdir;
extern ulong refresh_version,query_id,opened_tables;
extern uint test_flags,thread_count,select_errors,mysql_port,
thd_startup_options;
extern time_t start_time;
extern char *command_name[];
extern I_List<THD> threads;
extern MYSQL_LOG mysql_log,mysql_update_log;
extern pthread_key_t THR_MALLOC ;
extern pthread_key_t THR_THD ;
extern pthread_key_t THR_NET ;
extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open,
LOCK_thread_count,LOCK_mapped_file,LOCK_user_locks;
extern pthread_cond_t COND_refresh;
extern bool opt_endinfo;
extern char f_fyllchar;
extern DATE_FORMAT dayord;
extern double log_10[32];
extern uint current_pid,protocol_version;
extern ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
max_join_size,join_buff_size,tmp_table_size,thread_stack;
extern ulong specialflag;
extern bool volatile abort_loop;
extern char language[512 - 256 ],reg_ext[20 ],blob_newline;
extern char **errmesg;
extern byte last_ref[4 ];
extern String empty_string;
extern struct show_var_st variables[];
extern pthread_t signal_thread;
MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **table,uint count);
void mysql_unlock_tables(MYSQL_LOCK *sql_lock,bool no_free=0);
void mysql_unlock_some_tables(TABLE **table,uint count);
void mysql_lock_remove(MYSQL_LOCK *locked,TABLE *table);
MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b);
void unireg_init(ulong options);
void unireg_end(int signal);
int rea_create_table(my_string file_name,enum db_type database_type,
uint table_options, ulong records, ulong reloc,
List<create_field> &create_field,
uint key_count,KEY *key_info);
int format_number(uint inputflag,uint max_length,my_string pos,uint length,
my_string *errpos);
int cre_database(char *name);
int openfrm(const char *name,const char *alias,uint filestat,uint prgflag,
TABLE *outparam);
int closefrm(TABLE *table);
void free_blobs(TABLE *table);
void form_error(int error,char *name,char *formname,char *form_ext,
int errortype);
int set_zone(int nr,int min_zone,int max_zone);
ulong convert_period_to_month(ulong period);
ulong convert_month_to_period(ulong month);
long calc_daynr(uint year,uint month,uint day);
uint calc_days_in_year(uint year);
void get_date_from_daynr(long daynr,uint *year, uint *month,
uint *day);
void init_time(void);
long my_gmt_sec(TIME *);
time_t str_to_timestamp(const char *str,uint length);
ulong str_to_date(const char *str,uint length);
ulong str_to_time(const char *str,uint length);
longlong str_to_datetime(const char *str,uint length);
timestamp_type str_to_TIME(const char *str, uint length, TIME *l_time);
int test_if_number(char *str,int *res,bool allow_wildcards);
void change_byte(byte *,uint,char,char);
void unireg_abort(int exit_code);
void init_read_record(READ_RECORD *info, TABLE *reg_form, SQL_SELECT *select);
void end_read_record(READ_RECORD *info);
ulong get_ref_regs(TABLE **form,ulong reg_used);
void TEST_select(SQL_SELECT* select);
ulong filesort(TABLE **form,struct st_sort_field *sortorder, uint s_length,
SQL_SELECT *select, ulong special,ulong max_records);
void change_double_for_sort(double nr,byte *to);
int get_quick_record(SQL_SELECT *select);
int calc_weekday(long daynr);
void find_date(char *pos,uint *vek,uint flag);
TYPELIB *convert_strings_to_array_type(my_string *typelibs, my_string *end);
TYPELIB *typelib(List<String> &strings);
void clean_up(void);
ulong get_form_pos(File file, uchar *head,
my_string outname, TYPELIB *save_names);
ulong make_new_entry(File file,uchar *fileinfo,TYPELIB *formnames,
char *newname);
ulong next_io_size(ulong pos);
void append_unescaped(String *res,const char *pos);
int create_frm(char *name,uint reclength,uchar *fileinfo,
enum db_type database,uint options,
ulong records,ulong reloc,uint keys);
int rename_file_ext(const char * from,const char * to,const char * ext);
int fix_frm_ref(const char * name);
char *get_field(MEM_ROOT *mem,TABLE *table,uint fieldnr);
int wild_case_compare(const char *str,const char *wildstr);
inline THD *_current_thd(void)
{
return ( THD* ) pthread_getspecific( ( THR_THD ) ) ;
}
inline bool add_item_to_list(Item *item)
{
return _current_thd() ->item_list.push_back(item);
}
inline bool add_value_to_list(Item *value)
{
return _current_thd() ->value_list.push_back(value);
}
inline bool add_order_to_list(Item *item,bool asc)
{
return add_to_list(_current_thd() ->order_list,item,asc);
}
inline bool add_group_to_list(Item *item,bool asc)
{
return add_to_list(_current_thd() ->group_list,item,asc);
}
# 22 "sql_yacc.yy" 2
# 1 "sql_lex.h" 1
enum enum_sql_command {
SQL_SELECT,SQL_CREATE_TABLE,SQL_CREATE_INDEX,SQL_ALTER_TABLE,
SQL_UPDATE,SQL_INSERT,SQL_INSERT_SELECT,SQL_DELETE,
SQL_DROP_TABLE,SQL_DROP_INDEX,SQL_SHOW_DATABASES,
SQL_SHOW_TABLES,SQL_SHOW_FIELDS,SQL_SHOW_KEYS,
SQL_LOAD,SQL_SET_OPTION,SQL_LOCK_TABLES,SQL_UNLOCK_TABLES,SQL_GRANT,
SQL_CHANGE_DB, SQL_CREATE_DB, SQL_DROP_DB, SQL_REPLACE,
SQL_REPLACE_SELECT, SQL_SHOW_VARIABLES, SQL_SHOW_STATUS, SQL_CREATE_FUNCTION,
SQL_DROP_FUNCTION};
enum lex_states { STATE_START, STATE_CHAR, STATE_IDENT,
STATE_IDENT_SEP,
STATE_IDENT_START,
STATE_FOUND_IDENT,
STATE_SIGNED_NUMBER,
STATE_REAL,
STATE_CMP_OP,
STATE_STRING,
STATE_COMMENT,
STATE_END,
STATE_OPERATOR_OR_IDENT,
STATE_NUMBER_IDENT,
STATE_INT_OR_REAL,
STATE_REAL_OR_POINT,
STATE_BOOL,
STATE_EOL,
STATE_ESCAPE,
STATE_LONG_COMMENT
};
typedef struct st_lex {
uint yylineno,yytoklen;
void * yylval;
uchar *ptr,*tok_start,*tok_end,*end_of_query;
ulong select_limit,offset_limit;
bool create_refs,drop_primary;
enum_sql_command sql_command;
enum lex_states next_state;
uint type,options;
char *length,*db,*dec,*change,*name;
String *wild;
sql_exchange *exchange;
List<List_item> expr_list;
List<key_part_spec> col_list;
List<Alter_drop> drop_list;
List<Alter_column> alter_list;
List<String> interval_list;
TYPELIB *interval;
Item *where,*having;
bool unique_flag;
enum enum_duplicates duplicates;
CONVERT *convert_set;
char *table1,*table2;
gptr yacc_yyss,yacc_yyvs;
THD *thd;
udf_func udf;
} LEX;
void lex_init(void);
void lex_free(void);
LEX *lex_start(uchar *buf,uint length);
void lex_end(LEX *lex);
extern pthread_key_t THR_LEX ;
inline LEX *_current_lex(void)
{
return ( LEX * ) pthread_getspecific( ( THR_LEX ) ) ;
}
# 23 "sql_yacc.yy" 2
extern void yyerror(char*);
int yylex(void *yylval);
# 33 "sql_yacc.yy"
typedef union {
int num;
ulong ulong_num;
ulonglong ulonglong_num;
LEX_STRING lex_str;
char *simple_string;
Item *item;
List<Item> *item_list;
Key::Keytype key_type;
String *string;
key_part_spec *key_part;
TABLE_LIST *table_list;
udf_func *udf;
} YYSTYPE;
# 48 "sql_yacc.yy"
bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
static const short yytranslate[] = { 0,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 285, 2, 2, 2, 275, 270, 2, 282,
283, 273, 272, 284, 271, 290, 274, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 286, 287, 278,
277, 279, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
280, 2, 281, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 288, 269, 289, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (17/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (17 preceding siblings ...)
1998-09-08 21:44 ` bug (15/26) Brian Grossman
@ 1998-09-08 21:44 ` Brian Grossman
1998-09-08 21:44 ` bug (25/26) Brian Grossman
` (3 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 21:44 UTC (permalink / raw)
To: Alexandre Oliva
void update_field(int offset);
char *func_name() const { return "count"; }
};
class Item_sum_avg :public Item_sum_num
{
void fix_length_and_dec() { decimals+=4; maybe_null=1; }
double sum;
ulong count;
public:
Item_sum_avg(Item *item_par) :Item_sum_num(item_par),count(0) {}
enum Sumfunctype sum_func () const {return AVG_FUNC;}
void reset();
void add();
double val();
void reset_field();
void update_field(int offset);
char *func_name() const { return "avg"; }
};
class Item_sum_std :public Item_sum_num
{
double sum;
double sum_sqr;
ulong count;
void fix_length_and_dec() { decimals+=4; maybe_null=1; }
public:
Item_sum_std(Item *item_par) :Item_sum_num(item_par),count(0) {}
enum Sumfunctype sum_func () const { return STD_FUNC; }
void reset();
void add();
double val();
void reset_field();
void update_field(int offset);
char *func_name() const { return "std"; }
};
class Item_sum_hybrid :public Item_sum
{
protected:
String value,tmp_value;
double sum;
Item_result hybrid_type;
int cmp_sign;
public:
Item_sum_hybrid(Item *item_par,int sign) :Item_sum(item_par),cmp_sign(sign) {}
bool fix_fields(THD *,struct st_table_list *);
void reset()
{
sum=0.0;
value.length(0);
null_value=1;
add();
}
double val();
longlong val_int() { return (longlong) val(); }
void reset_field();
String *str(String *);
bool keep_field_type(void) const { return 1; }
enum Item_result result_type () const { return hybrid_type; }
void update_field(int offset);
void min_max_update_str_field(int offset);
void min_max_update_real_field(int offset);
void min_max_update_int_field(int offset);
};
class Item_sum_min :public Item_sum_hybrid
{
public:
Item_sum_min(Item *item_par) :Item_sum_hybrid(item_par,1) {}
enum Sumfunctype sum_func () const {return MIN_FUNC;}
void add();
char *func_name() const { return "min"; }
};
class Item_sum_max :public Item_sum_hybrid
{
public:
Item_sum_max(Item *item_par) :Item_sum_hybrid(item_par,-1) {}
enum Sumfunctype sum_func () const {return MAX_FUNC;}
void add();
char *func_name() const { return "max"; }
};
class Item_sum_bit :public Item_sum_int
{
void fix_length_and_dec()
{ decimals=0; max_length=21; maybe_null=null_value=0; }
protected:
ulonglong bits,reset_bits;
public:
Item_sum_bit(Item *item_par,ulonglong reset_arg)
:Item_sum_int(item_par),reset_bits(reset_arg) {}
enum Sumfunctype sum_func () const {return SUM_BIT_FUNC;}
void reset();
longlong val_int();
void reset_field();
};
class Item_sum_or :public Item_sum_bit
{
public:
Item_sum_or(Item *item_par) :Item_sum_bit(item_par, 0LL ) {}
void add();
void update_field(int offset);
char *func_name() const { return "bit_or"; }
};
class Item_sum_and :public Item_sum_bit
{
public:
Item_sum_and(Item *item_par) :Item_sum_bit(item_par,(ulonglong) ~0LL ) {}
void add();
void update_field(int offset);
char *func_name() const { return "bit_and"; }
};
class Item_avg_field :public Item_result_field
{
public:
Field *field;
Item_avg_field(Item_sum_avg *item);
enum Type type() const { return FIELD_AVG_ITEM; }
double val();
longlong val_int() { return (longlong) val(); }
String *str(String*);
void make_field(Send_field *field);
};
class Item_std_field :public Item_result_field
{
public:
Field *field;
Item_std_field(Item_sum_std *item);
enum Type type() const { return FIELD_STD_ITEM; }
double val();
longlong val_int() { return (longlong) val(); }
String *str(String*);
void make_field(Send_field *field);
};
# 295 "item.h" 2
# 1 "item_func.h" 1
#pragma interface
class Item_func :public Item_result_field
{
protected:
Item **args;
uint arg_count;
public:
table_map used_tables_cache;
enum Functype { UNKNOWN_FUNC,EQ_FUNC,NE_FUNC,LT_FUNC,LE_FUNC,GE_FUNC,GT_FUNC,
LIKE_FUNC,NOTLIKE_FUNC,ISNULL_FUNC,ISNOTNULL_FUNC,
COND_AND_FUNC,COND_OR_FUNC,BETWEEN,IN_FUNC,INTERVAL_FUNC};
enum optimize_type { OPTIMIZE_NONE,OPTIMIZE_KEY,OPTIMIZE_OP };
enum Type type() const { return FUNC_ITEM; }
virtual enum Functype functype() const { return UNKNOWN_FUNC; }
Item_func(void)
{
arg_count=0;
}
Item_func(Item *a)
{
arg_count=1;
args=(Item**) sql_alloc(sizeof(Item*));
args[0]=a;
}
Item_func(Item *a,Item *b)
{
arg_count=2;
args=(Item**) sql_alloc(sizeof(Item*)*2);
args[0]=a; args[1]=b;
}
Item_func(Item *a,Item *b,Item *c)
{
arg_count=3;
args=(Item**) sql_alloc(sizeof(Item*)*3);
args[0]=a; args[1]=b; args[2]=c;
}
Item_func(Item *a,Item *b,Item *c,Item *d)
{
arg_count=4;
args=(Item**) sql_alloc(sizeof(Item*)*4);
args[0]=a; args[1]=b; args[2]=c; args[3]=d;
}
Item_func(List<Item> &list);
~Item_func();
bool fix_fields(THD *,struct st_table_list *);
void make_field(Send_field *field);
ulong used_tables() const;
void update_used_tables();
virtual void fix_length_and_dec()=0;
virtual optimize_type select_optimize() const { return OPTIMIZE_NONE; }
virtual Item *key_item() const { return args[0]; }
virtual char *func_name() const { return "?"; }
inline Item **arguments() const { return args; }
inline uint argument_count() const { return arg_count; }
inline void remove_arguments() { arg_count=0; }
void split_sum_func(List<Item> &fields);
void print(String *str);
void print_op(String *str);
void fix_num_length_and_dec();
};
class Item_num_func :public Item_func
{
public:
Item_num_func() :Item_func() {}
Item_num_func(Item *a) :Item_func(a) {}
Item_num_func(Item *a,Item *b) :Item_func(a,b) {}
Item_num_func(List<Item> &list) :Item_func(list) {}
String *str(String*str);
longlong val_int() { return (longlong) val(); }
enum Item_result result_type () const { return REAL_RESULT; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
};
class Item_num_op :public Item_num_func
{
public:
Item_num_op(Item *a,Item *b) :Item_num_func(a,b) {}
void print(String *str) { print_op(str); }
};
class Item_int_func :public Item_func
{
public:
Item_int_func() :Item_func() {}
Item_int_func(Item *a) :Item_func(a) {}
Item_int_func(Item *a,Item *b) :Item_func(a,b) {}
Item_int_func(Item *a,Item *b,Item *c) :Item_func(a,b,c) {}
Item_int_func(List<Item> &list) :Item_func(list) {}
double val() { return (double) val_int(); }
String *str(String*str);
enum Item_result result_type () const { return INT_RESULT; }
void fix_length_and_dec() { decimals=0; max_length=21; }
};
class Item_func_plus :public Item_num_op
{
public:
Item_func_plus(Item *a,Item *b) :Item_num_op(a,b) {}
char *func_name() const { return "+"; }
double val();
};
class Item_func_minus :public Item_num_op
{
public:
Item_func_minus(Item *a,Item *b) :Item_num_op(a,b) {}
char *func_name() const { return "-"; }
double val();
};
class Item_func_mul :public Item_num_op
{
public:
Item_func_mul(Item *a,Item *b) :Item_num_op(a,b) {}
char *func_name() const { return "*"; }
double val();
};
class Item_func_div :public Item_num_op
{
public:
Item_func_div(Item *a,Item *b) :Item_num_op(a,b) {}
double val();
char *func_name() const { return "/"; }
void fix_length_and_dec();
};
class Item_func_mod :public Item_num_op
{
public:
Item_func_mod(Item *a,Item *b) :Item_num_op(a,b) {}
longlong val_int();
double val();
char *func_name() const { return "%"; }
void fix_length_and_dec();
};
class Item_func_neg :public Item_num_func
{
public:
Item_func_neg(Item *a) :Item_num_func(a) {}
double val();
char *func_name() const { return "-"; }
void fix_length_and_dec();
};
class Item_func_abs :public Item_num_func
{
public:
Item_func_abs(Item *a) :Item_num_func(a) {}
char *func_name() const { return "abs"; }
double val();
};
class Item_dec_func :public Item_num_func
{
public:
Item_dec_func(Item *a) :Item_num_func(a) {}
Item_dec_func(Item *a,Item *b) :Item_num_func(a,b) {}
void fix_length_and_dec()
{
decimals=6; max_length=float_length(decimals);
maybe_null=1;
}
inline double fix_result(double value)
{
if (finite(value) && value != 1.7976931348623157e+308 )
return value;
null_value=1;
return 0.0;
}
};
class Item_func_exp :public Item_dec_func
{
public:
Item_func_exp(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "exp"; }
};
class Item_func_log :public Item_dec_func
{
public:
Item_func_log(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "log"; }
};
class Item_func_log10 :public Item_dec_func
{
public:
Item_func_log10(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "log10"; }
};
class Item_func_sqrt :public Item_dec_func
{
public:
Item_func_sqrt(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "sqrt"; }
};
class Item_func_pow :public Item_dec_func
{
public:
Item_func_pow(Item *a,Item *b) :Item_dec_func(a,b) {}
double val();
char *func_name() const { return "pow"; }
};
class Item_func_acos :public Item_dec_func
{
public:
Item_func_acos(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "acos"; }
};
class Item_func_asin :public Item_dec_func
{
public:
Item_func_asin(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "asin"; }
};
class Item_func_atan :public Item_dec_func
{
public:
Item_func_atan(Item *a) :Item_dec_func(a) {}
Item_func_atan(Item *a,Item *b) :Item_dec_func(a,b) {}
double val();
char *func_name() const { return "atan"; }
};
class Item_func_cos :public Item_dec_func
{
public:
Item_func_cos(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "cos"; }
};
class Item_func_sin :public Item_dec_func
{
public:
Item_func_sin(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "sin"; }
};
class Item_func_tan :public Item_dec_func
{
public:
Item_func_tan(Item *a) :Item_dec_func(a) {}
double val();
char *func_name() const { return "tan"; }
};
class Item_func_integer :public Item_int_func
{
public:
Item_func_integer(Item *a) :Item_int_func(a) {}
void fix_length_and_dec();
};
class Item_func_ceiling :public Item_func_integer
{
public:
Item_func_ceiling(Item *a) :Item_func_integer(a) {}
char *func_name() const { return "ceiling"; }
longlong val_int();
};
class Item_func_floor :public Item_func_integer
{
public:
Item_func_floor(Item *a) :Item_func_integer(a) {}
char *func_name() const { return "floor"; }
longlong val_int();
};
class Item_func_round :public Item_num_func
{
bool truncate;
public:
Item_func_round(Item *a,Item *b,bool trunc_arg)
:Item_num_func(a,b),truncate(trunc_arg) {}
char *func_name() const { return truncate ? "truncate" : "round"; }
double val();
void fix_length_and_dec();
};
class Item_func_rand :public Item_num_func
{
public:
Item_func_rand(Item *a) :Item_num_func(a) {}
Item_func_rand() :Item_num_func() {}
double val();
char *func_name() const { return "rand"; }
void fix_length_and_dec() { max_length=6; decimals=4; }
};
class Item_func_sign :public Item_int_func
{
public:
Item_func_sign(Item *a) :Item_int_func(a) {}
char *func_name() const { return "sign"; }
longlong val_int();
};
class Item_func_units :public Item_num_func
{
char *name;
double mul,add;
public:
Item_func_units(char *name_arg,Item *a,double mul_arg,double add_arg)
:Item_num_func(a),name(name_arg),mul(mul_arg),add(add_arg) {}
double val();
char *func_name() const { return name; }
void fix_length_and_dec() { decimals=6; max_length=float_length(decimals); }
};
class Item_func_min_max :public Item_num_func
{
public:
Item_func_min_max(List<Item> &list) :Item_num_func(list) {}
void fix_length_and_dec();
};
class Item_func_min :public Item_func_min_max
{
public:
Item_func_min(List<Item> &list) :Item_func_min_max(list) {}
double val();
char *func_name() const { return "min"; }
};
class Item_func_max :public Item_func_min_max
{
public:
Item_func_max(List<Item> &list) :Item_func_min_max(list) {}
double val();
char *func_name() const { return "max"; }
};
class Item_func_length :public Item_int_func
{
String value;
public:
Item_func_length(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "length"; }
void fix_length_and_dec() { max_length=10; }
};
class Item_func_locate :public Item_int_func
{
String value1,value2;
public:
Item_func_locate(Item *a,Item *b) :Item_int_func(a,b) {}
Item_func_locate(Item *a,Item *b,Item *c) :Item_int_func(a,b,c) {}
char *func_name() const { return "locate"; }
longlong val_int();
void fix_length_and_dec() { maybe_null=0; max_length=11; }
};
class Item_func_field :public Item_int_func
{
Item *item;
String value,tmp;
public:
Item_func_field(Item *a,List<Item> &list) :Item_int_func(list),item(a) {}
~Item_func_field() { delete item; }
longlong val_int();
bool fix_fields(THD *thd,struct st_table_list *tlist)
{
return (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist));
}
char *func_name() const { return "field"; }
void fix_length_and_dec() { maybe_null=0; max_length=2; }
};
class Item_func_ascii :public Item_int_func
{
String value;
public:
Item_func_ascii(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "ascii"; }
void fix_length_and_dec() { max_length=3; }
};
class Item_func_find_in_set :public Item_int_func
{
String value,value2;
uint enum_value;
ulonglong enum_bit;
public:
Item_func_find_in_set(Item *a,Item *b) :Item_int_func(a,b),enum_value(0) {}
longlong val_int();
char *func_name() const { return "find_in_set"; }
void fix_length_and_dec();
};
class Item_func_bit_or :public Item_int_func
{
public:
Item_func_bit_or(Item *a,Item *b) :Item_int_func(a,b) {}
longlong val_int();
char *func_name() const { return "|"; }
void fix_length_and_dec() { decimals=0; max_length=10; }
};
class Item_func_bit_and :public Item_int_func
{
public:
Item_func_bit_and(Item *a,Item *b) :Item_int_func(a,b) {}
longlong val_int();
char *func_name() const { return "&"; }
void fix_length_and_dec() { decimals=0; max_length=10; }
};
class Item_func_bit_count :public Item_int_func
{
public:
Item_func_bit_count(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "bit_count"; }
void fix_length_and_dec() { decimals=0; max_length=2; }
};
# 568 "item_func.h"
class Item_func_udf_float :public Item_num_func
{
public:
Item_func_udf_float(udf_func *udf) :Item_num_func() {}
Item_func_udf_float(udf_func *udf, List<Item> &list) :Item_num_func(list) {}
~Item_func_udf_float() {}
double val() { return 0.0; }
};
class Item_func_udf_int :public Item_int_func
{
public:
Item_func_udf_int(udf_func *udf) :Item_int_func() {}
Item_func_udf_int(udf_func *udf, List<Item> &list) :Item_int_func(list) {}
~Item_func_udf_int() {}
longlong val_int() { return 0; }
};
class Item_func_udf_str :public Item_func
{
public:
Item_func_udf_str(udf_func *udf) :Item_func() {}
Item_func_udf_str(udf_func *udf, List<Item> &list) :Item_func(list) {}
~Item_func_udf_str() {}
String *str(String *) { null_value=1; return 0; }
double val() { null_value=1; return 0.0; }
longlong val_int() { null_value=1; return 0; }
enum Item_result result_type () const { return STRING_RESULT; }
void fix_length_and_dec() { maybe_null=1; max_length=0; }
};
class ULL;
void item_user_lock_init(void);
void item_user_lock_release(ULL *ull);
class Item_func_get_lock :public Item_int_func
{
String value;
public:
Item_func_get_lock(Item *a,Item *b) :Item_int_func(a,b) {}
longlong val_int();
char *func_name() const { return "get_lock"; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1;}
};
class Item_func_release_lock :public Item_int_func
{
String value;
public:
Item_func_release_lock(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "release_lock"; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1;}
};
# 296 "item.h" 2
# 1 "item_cmpfunc.h" 1
#pragma interface
class Item_bool_func :public Item_int_func
{
public:
Item_bool_func() :Item_int_func() {}
Item_bool_func(Item *a) :Item_int_func(a) {}
Item_bool_func(Item *a,Item *b) :Item_int_func(a,b) {}
void fix_length_and_dec() { decimals=0; max_length=1; }
};
class Item_bool_func2 :public Item_int_func
{
protected:
String tmp_value1,tmp_value2;
public:
Item_result cmp_type;
Item_bool_func2(Item *a,Item *b) :Item_int_func(a,b) {}
void fix_length_and_dec();
int compare();
optimize_type select_optimize() const { return OPTIMIZE_OP; }
virtual enum Functype rev_functype() const { return UNKNOWN_FUNC; }
void print(String *str) { Item_func::print_op(str); }
};
class Item_func_not :public Item_bool_func
{
public:
Item_func_not(Item *a) :Item_bool_func(a) {}
longlong val_int();
char *func_name() const { return "not"; }
};
class Item_func_eq :public Item_bool_func2
{
public:
Item_func_eq(Item *a,Item *b) :Item_bool_func2(a,b) { };
longlong val_int();
enum Functype functype() const { return EQ_FUNC; }
enum Functype rev_functype() const { return EQ_FUNC; }
cond_result eq_cmp_result() const { return COND_TRUE; }
char *func_name() const { return "="; }
};
class Item_func_ge :public Item_bool_func2
{
public:
Item_func_ge(Item *a,Item *b) :Item_bool_func2(a,b) { };
longlong val_int();
enum Functype functype() const { return GE_FUNC; }
enum Functype rev_functype() const { return LE_FUNC; }
cond_result eq_cmp_result() const { return COND_TRUE; }
char *func_name() const { return ">="; }
};
class Item_func_gt :public Item_bool_func2
{
public:
Item_func_gt(Item *a,Item *b) :Item_bool_func2(a,b) { };
longlong val_int();
enum Functype functype() const { return GT_FUNC; }
enum Functype rev_functype() const { return LT_FUNC; }
cond_result eq_cmp_result() const { return COND_FALSE; }
char *func_name() const { return ">"; }
};
class Item_func_le :public Item_bool_func2
{
public:
Item_func_le(Item *a,Item *b) :Item_bool_func2(a,b) { };
longlong val_int();
enum Functype functype() const { return LE_FUNC; }
enum Functype rev_functype() const { return GE_FUNC; }
cond_result eq_cmp_result() const { return COND_TRUE; }
char *func_name() const { return "<="; }
};
class Item_func_lt :public Item_bool_func2
{
public:
Item_func_lt(Item *a,Item *b) :Item_bool_func2(a,b) { }
longlong val_int();
enum Functype functype() const { return LT_FUNC; }
enum Functype rev_functype() const { return GT_FUNC; }
cond_result eq_cmp_result() const { return COND_FALSE; }
char *func_name() const { return "<"; }
};
class Item_func_ne :public Item_bool_func2
{
public:
Item_func_ne(Item *a,Item *b) :Item_bool_func2(a,b) { }
longlong val_int();
enum Functype functype() const { return NE_FUNC; }
cond_result eq_cmp_result() const { return COND_FALSE; }
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
char *func_name() const { return "<>"; }
};
class Item_func_between :public Item_int_func
{
int (*string_compare)(const String *x,const String *y);
public:
String value0,value1,value2;
Item_func_between(Item *a,Item *b,Item *c) :Item_int_func(a,b,c) {}
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_KEY; }
enum Functype functype() const { return BETWEEN; }
char *func_name() const { return "between"; }
void fix_length_and_dec();
};
class Item_func_strcmp :public Item_bool_func2
{
public:
Item_func_strcmp(Item *a,Item *b) :Item_bool_func2(a,b) {}
longlong val_int();
void fix_length_and_dec() { max_length=2; }
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
char *func_name() const { return "strcmp"; }
};
class Item_func_interval :public Item_int_func
{
Item *item;
double *intervals;
public:
Item_func_interval(Item *a,List<Item> &list)
:Item_int_func(list),item(a),intervals(0) {}
longlong val_int();
bool fix_fields(THD *thd,struct st_table_list *tlist)
{
return (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist));
}
void fix_length_and_dec();
~Item_func_interval() { delete item; }
char *func_name() const { return "interval"; }
void update_used_tables();
};
class Item_func_ifnull :public Item_func
{
enum Item_result cached_result_type;
public:
Item_func_ifnull(Item *a,Item *b) :Item_func(a,b) { }
double val();
longlong val_int();
String *str(String *str);
enum Item_result result_type () const { return cached_result_type; }
void fix_length_and_dec();
char *func_name() const { return "ifnull"; }
};
class Item_func_if :public Item_func
{
enum Item_result cached_result_type;
public:
Item_func_if(Item *a,Item *b,Item *c) :Item_func(a,b,c) { }
double val();
longlong val_int();
String *str(String *str);
enum Item_result result_type () const { return cached_result_type; }
void fix_length_and_dec();
char *func_name() const { return "if"; }
};
class in_vector :public Sql_alloc
{
protected:
char *base;
uint size;
qsort_cmp compare;
uint count;
public:
uint used_count;
in_vector(uint elements,uint element_length,qsort_cmp cmp_func)
:base((char*) sql_calloc(elements*element_length)),
size(element_length), compare(cmp_func), count(elements),
used_count(elements) {}
virtual ~in_vector() {}
virtual void set(uint pos,Item *item)=0;
virtual byte *get_value(Item *item)=0;
void sort()
{
qsort(base,used_count,size,compare);
}
int find(Item *item);
};
class in_string :public in_vector
{
char buff[80];
String tmp;
public:
in_string(uint elements,qsort_cmp cmp_func);
~in_string();
void set(uint pos,Item *item);
byte *get_value(Item *item);
};
class in_longlong :public in_vector
{
longlong tmp;
public:
in_longlong(uint elements);
void set(uint pos,Item *item);
byte *get_value(Item *item);
};
class in_double :public in_vector
{
double tmp;
public:
in_double(uint elements);
void set(uint pos,Item *item);
byte *get_value(Item *item);
};
class cmp_item :public Sql_alloc
{
public:
cmp_item() {}
virtual ~cmp_item() {}
virtual void store_value(Item *item)=0;
virtual int cmp(Item *item)=0;
};
class cmp_item_sort_string :public cmp_item {
protected:
char value_buff[80];
String value,*value_res;
public:
cmp_item_sort_string() :value(value_buff,sizeof(value_buff)) {}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (18/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (20 preceding siblings ...)
1998-09-08 21:44 ` bug (19/26) Brian Grossman
@ 1998-09-08 21:44 ` Brian Grossman
1998-09-08 21:44 ` bug (16/26) Brian Grossman
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 21:44 UTC (permalink / raw)
To: Alexandre Oliva
void store_value(Item *item)
{
value_res=item->str(&value);
}
int cmp(Item *arg)
{
char buff[80];
String tmp(buff,sizeof(buff)),*res;
if (!(res=arg->str(&tmp)))
return 1;
return sortcmp(value_res,res);
}
};
class cmp_item_binary_string :public cmp_item_sort_string {
public:
cmp_item_binary_string() {}
int cmp(Item *arg)
{
char buff[80];
String tmp(buff,sizeof(buff)),*res;
if (!(res=arg->str(&tmp)))
return 1;
return stringcmp(value_res,res);
}
};
class cmp_item_int :public cmp_item
{
longlong value;
public:
void store_value(Item *item)
{
value=item->val_int();
}
int cmp(Item *arg)
{
return value != arg->val_int();
}
};
class cmp_item_real :public cmp_item
{
double value;
public:
void store_value(Item *item)
{
value= item->val();
}
int cmp(Item *arg)
{
return value != arg->val();
}
};
class Item_func_in :public Item_int_func
{
Item *item;
in_vector *array;
cmp_item *in_item;
public:
Item_func_in(Item *a,List<Item> &list)
:Item_int_func(list),item(a),array(0),in_item(0) {}
longlong val_int();
bool fix_fields(THD *thd,struct st_table_list *tlist)
{
return (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist));
}
void fix_length_and_dec();
~Item_func_in() { delete item; delete array; delete in_item; }
optimize_type select_optimize() const
{ return array ? OPTIMIZE_KEY : OPTIMIZE_NONE; }
Item *key_item() const { return item; }
void print(String *str);
enum Functype functype() const { return IN_FUNC; }
char *func_name() const { return " IN "; }
void update_used_tables();
};
class Item_func_isnull :public Item_bool_func
{
public:
Item_func_isnull(Item *a) :Item_bool_func(a) {}
longlong val_int();
enum Functype functype() const { return ISNULL_FUNC; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=0; }
char *func_name() const { return "isnull"; }
};
class Item_func_isnotnull :public Item_bool_func
{
public:
Item_func_isnotnull(Item *a) :Item_bool_func(a) {}
longlong val_int();
enum Functype functype() const { return ISNOTNULL_FUNC; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=0; }
char *func_name() const { return "isnotnull"; }
};
class Item_func_like :public Item_bool_func2
{
public:
Item_func_like(Item *a,Item *b) :Item_bool_func2(a,b) {}
longlong val_int();
enum Functype functype() const { return LIKE_FUNC; }
optimize_type select_optimize() const;
cond_result eq_cmp_result() const { return COND_TRUE; }
char *func_name() const { return "like"; }
void fix_length_and_dec();
};
# 1 "../regex/regex.h" 1
extern "C" {
typedef off_t regoff_t;
struct re_guts;
typedef struct {
int re_magic;
size_t re_nsub;
const char *re_endp;
struct re_guts *re_g;
} regex_t;
typedef struct {
regoff_t rm_so;
regoff_t rm_eo;
} regmatch_t;
extern int regcomp(regex_t *, const char *, int);
extern size_t regerror(int, const regex_t *, char *, size_t);
extern int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
extern void regfree(regex_t *);
extern void regex_init(void);
extern void regex_end(void);
}
# 395 "item_cmpfunc.h" 2
class Item_func_regex :public Item_bool_func
{
regex_t preg;
bool regex_compiled;
public:
Item_func_regex(Item *a,Item *b) :Item_bool_func(a,b),regex_compiled(0) {}
~Item_func_regex();
longlong val_int();
bool fix_fields(THD *thd,struct st_table_list *tlist);
char *func_name() const { return "regex"; }
};
# 419 "item_cmpfunc.h"
typedef class Item COND;
class Item_cond :public Item_bool_func
{
protected:
List<Item> list;
public:
Item_cond() : Item_bool_func() {}
Item_cond(Item *i1,Item *i2) :Item_bool_func()
{ list.push_back(i1); list.push_back(i2); }
~Item_cond() { list.delete_elements(); }
void add(Item *item) { list.push_back(item); }
bool fix_fields(THD *,struct st_table_list *);
enum Type type() const { return COND_ITEM; }
List<Item>* argument_list() { return &list; }
table_map used_tables() const;
void update_used_tables();
void print(String *str);
friend int setup_conds(THD *thd,TABLE_LIST *tables,COND *conds);
};
class Item_cond_and :public Item_cond
{
public:
Item_cond_and() :Item_cond() {}
Item_cond_and(Item *i1,Item *i2) :Item_cond(i1,i2) {}
enum Functype functype() const { return COND_AND_FUNC; }
longlong val_int();
char *func_name() const { return "and"; }
};
class Item_cond_or :public Item_cond
{
public:
Item_cond_or() :Item_cond() {}
Item_cond_or(Item *i1,Item *i2) :Item_cond(i1,i2) {}
enum Functype functype() const { return COND_OR_FUNC; }
longlong val_int();
char *func_name() const { return "or"; }
};
# 297 "item.h" 2
# 1 "item_strfunc.h" 1
#pragma interface
class Item_str_func :public Item_func
{
public:
Item_str_func() :Item_func() {}
Item_str_func(Item *a) :Item_func(a) {}
Item_str_func(Item *a,Item *b) :Item_func(a,b) {}
Item_str_func(Item *a,Item *b,Item *c) :Item_func(a,b,c) {}
Item_str_func(Item *a,Item *b,Item *c,Item *d) :Item_func(a,b,c,d) {}
Item_str_func(List<Item> &list) :Item_func(list) {}
longlong val_int();
double val();
enum Item_result result_type () const { return STRING_RESULT; }
void left_right_max_length();
};
class Item_func_concat :public Item_str_func
{
String tmp_value;
public:
Item_func_concat(List<Item> &list) :Item_str_func(list) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "concat"; }
};
class Item_func_reverse :public Item_str_func
{
public:
Item_func_reverse(Item *a) :Item_str_func(a) {}
String *str(String *);
void fix_length_and_dec();
};
class Item_func_replace :public Item_str_func
{
String tmp_value,tmp_value2;
public:
Item_func_replace(Item *org,Item *find,Item *replace)
:Item_str_func(org,find,replace) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "replace"; }
};
class Item_func_insert :public Item_str_func
{
String tmp_value;
public:
Item_func_insert(Item *org,Item *start,Item *length,Item *new_str)
:Item_str_func(org,start,length,new_str) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "insert"; }
};
class Item_str_conv :public Item_str_func
{
public:
Item_str_conv(Item *item) :Item_str_func(item) {}
void fix_length_and_dec() { max_length = args[0]->max_length; }
};
class Item_func_lcase :public Item_str_conv
{
public:
Item_func_lcase(Item *item) :Item_str_conv(item) {}
String *str(String *);
char *func_name() const { return "lcase"; }
};
class Item_func_ucase :public Item_str_conv
{
public:
Item_func_ucase(Item *item) :Item_str_conv(item) {}
String *str(String *);
char *func_name() const { return "ucase"; }
};
class Item_func_left :public Item_str_func
{
public:
Item_func_left(Item *a,Item *b) :Item_str_func(a,b) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "left"; }
};
class Item_func_right :public Item_str_func
{
String tmp_value;
public:
Item_func_right(Item *a,Item *b) :Item_str_func(a,b) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "right"; }
};
class Item_func_substr :public Item_str_func
{
String tmp_value;
public:
Item_func_substr(Item *a,Item *b,Item *c) :Item_str_func(a,b,c) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "substr"; }
};
class Item_func_substr_index :public Item_str_func
{
String tmp_value;
public:
Item_func_substr_index(Item *a,Item *b,Item *c) :Item_str_func(a,b,c) {}
String *str(String *);
void fix_length_and_dec() { max_length= args[0]->max_length; }
char *func_name() const { return "substr_index"; }
};
class Item_func_ltrim :public Item_str_func
{
String tmp_value;
public:
Item_func_ltrim(Item *a,Item *b) :Item_str_func(a,b) {}
String *str(String *);
void fix_length_and_dec() { max_length= args[0]->max_length; }
char *func_name() const { return "ltrim"; }
};
class Item_func_rtrim :public Item_str_func
{
String tmp_value;
public:
Item_func_rtrim(Item *a,Item *b) :Item_str_func(a,b) {}
String *str(String *);
void fix_length_and_dec() { max_length= args[0]->max_length; }
char *func_name() const { return "rtrim"; }
};
class Item_func_trim :public Item_str_func
{
String tmp_value;
public:
Item_func_trim(Item *a,Item *b) :Item_str_func(a,b) {}
String *str(String *);
void fix_length_and_dec() { max_length= args[0]->max_length; }
char *func_name() const { return "trim"; }
};
class Item_func_password :public Item_str_func
{
char tmp_value[17];
public:
Item_func_password(Item *a) :Item_str_func(a) {}
String *str(String *);
void fix_length_and_dec() { max_length = 16; }
char *func_name() const { return "password"; }
};
class Item_func_encrypt :public Item_str_func
{
String tmp_value;
public:
Item_func_encrypt(Item *a) :Item_str_func(a) {}
Item_func_encrypt(Item *a, Item *b): Item_str_func(a,b) {}
String *str(String *);
void fix_length_and_dec() { maybe_null=1; max_length = 13; }
};
class Item_func_database :public Item_str_func
{
public:
Item_func_database() {}
String *str(String *);
void fix_length_and_dec() { max_length= 34 ; }
char *func_name() const { return "database"; }
};
class Item_func_user :public Item_str_func
{
public:
Item_func_user() {}
String *str(String *);
void fix_length_and_dec() { max_length= 34 ; }
char *func_name() const { return "user"; }
};
class Item_func_soundex :public Item_str_func
{
public:
Item_func_soundex(Item *a) :Item_str_func(a) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "soundex"; }
};
class Item_func_elt :public Item_str_func
{
Item *item;
public:
Item_func_elt(Item *a,List<Item> &list) :Item_str_func(list),item(a) {}
~Item_func_elt() { delete item; }
double val();
longlong val_int();
String *str(String *str);
bool fix_fields(THD *thd,struct st_table_list *tlist)
{
return (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist));
}
void fix_length_and_dec();
void update_used_tables();
char *func_name() const { return "elt"; }
};
class Item_func_format :public Item_str_func
{
String tmp_str;
public:
Item_func_format(Item *org,int dec);
String *str(String *);
void fix_length_and_dec()
{
max_length=args[0]->max_length+(args[0]->max_length-args[0]->decimals)/3;
}
char *func_name() const { return "format"; }
};
class Item_func_char :public Item_str_func
{
public:
Item_func_char(List<Item> &list) :Item_str_func(list) {}
String *str(String *);
void fix_length_and_dec() { maybe_null=0; max_length=arg_count; }
char *func_name() const { return "char"; }
};
class Item_func_repeat :public Item_str_func
{
String tmp_value;
public:
Item_func_repeat(Item *arg1,Item *arg2) :Item_str_func(arg1,arg2) {}
String *str(String *);
void fix_length_and_dec();
char *func_name() const { return "repeat"; }
};
# 298 "item.h" 2
# 1 "item_timefunc.h" 1
#pragma interface
class Item_func_period_add :public Item_int_func
{
public:
Item_func_period_add(Item *a,Item *b) :Item_int_func(a,b) {}
longlong val_int();
char *func_name() const { return "period_add"; }
void fix_length_and_dec() { max_length=6; }
};
class Item_func_period_diff :public Item_int_func
{
public:
Item_func_period_diff(Item *a,Item *b) :Item_int_func(a,b) {}
longlong val_int();
char *func_name() const { return "period_diff"; }
void fix_length_and_dec() { decimals=0; max_length=6; }
};
class Item_func_to_days :public Item_int_func
{
String value;
public:
Item_func_to_days(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "to_days"; }
void fix_length_and_dec() { decimals=0; max_length=6; }
};
class Item_func_dayofmonth :public Item_int_func
{
String value;
public:
Item_func_dayofmonth(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "dayofmonth"; }
void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; }
};
class Item_func_month :public Item_func
{
String value;
public:
Item_func_month(Item *a) :Item_func(a) {}
longlong val_int();
double val() { return (double) val_int(); }
String *str(String *str) { str->set(val_int()); return null_value ? 0 : str;}
char *func_name() const { return "month"; }
enum Item_result result_type () const { return INT_RESULT; }
void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; }
};
class Item_func_monthname :public Item_func_month
{
public:
Item_func_monthname(Item *a) :Item_func_month(a) {}
char *func_name() const { return "monthname"; }
String *str(String *str);
enum Item_result result_type () const { return STRING_RESULT; }
void fix_length_and_dec() { decimals=0; max_length=10; maybe_null=1; }
};
class Item_func_dayofyear :public Item_int_func
{
String value;
public:
Item_func_dayofyear(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "dayofyear"; }
void fix_length_and_dec() { decimals=0; max_length=3; maybe_null=1; }
};
class Item_func_hour :public Item_int_func
{
String value;
public:
Item_func_hour(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "hour"; }
void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; }
};
class Item_func_minute :public Item_int_func
{
String value;
public:
Item_func_minute(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "minute"; }
void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; }
};
class Item_func_quarter :public Item_int_func
{
String value;
public:
Item_func_quarter(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "quarter"; }
void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1; }
};
class Item_func_second :public Item_int_func
{
String value;
public:
Item_func_second(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "second"; }
void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; }
};
class Item_func_week :public Item_int_func
{
String value;
public:
Item_func_week(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "week"; }
void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; }
};
class Item_func_year :public Item_int_func
{
String value;
public:
Item_func_year(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "year"; }
void fix_length_and_dec() { decimals=0; max_length=4; maybe_null=1; }
};
class Item_func_weekday :public Item_func
{
String value;
bool odbc_type;
public:
Item_func_weekday(Item *a,bool type) :Item_func(a), odbc_type(type) {}
longlong val_int();
double val() { return (double) val_int(); }
String *str(String *str) { str->set(val_int()); return null_value ? 0 : str;}
char *func_name() const { return "weekday"; }
enum Item_result result_type () const { return INT_RESULT; }
void fix_length_and_dec() { decimals=0; max_length=1; }
};
class Item_func_dayname :public Item_func_weekday
{
public:
Item_func_dayname(Item *a) :Item_func_weekday(a,0) {}
char *func_name() const { return "dayname"; }
String *str(String *str);
enum Item_result result_type () const { return STRING_RESULT; }
void fix_length_and_dec() { decimals=0; max_length=9; maybe_null=1; }
};
class Item_func_unix_timestamp :public Item_int_func
{
String value;
public:
Item_func_unix_timestamp() :Item_int_func() {}
Item_func_unix_timestamp(Item *a) :Item_int_func(a) {}
longlong val_int();
char *func_name() const { return "timestamp"; }
void fix_length_and_dec()
{
decimals=0; max_length=10;
}
};
class Item_func_time_to_sec :public Item_int_func
{
String value;
public:
Item_func_time_to_sec(Item *item) :Item_int_func(item) {}
longlong val_int();
char *func_name() const { return "time_to_sec"; }
void fix_length_and_dec()
{
decimals=0; max_length=10;
}
};
class Item_interval :public Item_func
{
char buff[32];
public:
enum interval_type { YEAR, MONTH, DAY, HOUR, MINUTE, SECOND,
YEAR_MONTH, DAY_HOUR, DAY_MINUTE, DAY_SECOND,
HOUR_MINUTE, HOUR_SECOND, MINUTE_SECOND};
const interval_type int_type;
Item_interval(Item *a,interval_type b) :Item_func(a),int_type(b) {}
String *str(String *) {return 0;}
longlong val_int() { return 0;}
double val() { return 0.0;}
void fix_length_and_dec();
bool val_time(INTERVAL *time);
char *func_name() const { return "interval"; }
enum Functype functype() const { return INTERVAL_FUNC; }
};
class Item_date :public Item_func
{
public:
Item_date() :Item_func() {}
Item_date(Item *a) :Item_func(a) {}
enum Item_result result_type () const { return STRING_RESULT; }
String *str(String *str);
double val() { return (double) val_int(); }
char *func_name() const { return "date"; }
void fix_length_and_dec() { decimals=0; max_length=10; }
};
class Item_func_curtime :public Item_func
{
longlong value;
char buff[9];
public:
Item_func_curtime() :Item_func() {}
Item_func_curtime(Item *a) :Item_func(a) {}
enum Item_result result_type () const { return STRING_RESULT; }
double val() { return (double) value; }
longlong val_int() { return value; }
String *str(String *str) { return &str_value; }
char *func_name() const { return "curtime"; }
void fix_length_and_dec();
};
class Item_func_date_add_mm :public Item_str_func
{
public:
Item_func_date_add_mm(Item *a,Item *b) :Item_str_func(a,b) {}
enum Item_result result_type () const { return STRING_RESULT; }
String *str(String *str);
char *func_name() const { return "date_add_mm"; }
void fix_length_and_dec();
};
class Item_func_curdate :public Item_date
{
longlong value;
public:
Item_func_curdate() :Item_date() {}
longlong val_int();
char *func_name() const { return "curdate"; }
void fix_length_and_dec();
};
class Item_func_now :public Item_func
{
longlong value;
char buff[20];
public:
Item_func_now() :Item_func() {}
Item_func_now(Item *a) :Item_func(a) {}
enum Item_result result_type () const { return STRING_RESULT; }
double val() { return (double) Item_func_now::val_int(); }
longlong val_int();
String *str(String *str);
char *func_name() const { return "now"; }
void fix_length_and_dec();
};
class Item_func_from_days :public Item_date
{
public:
Item_func_from_days(Item *a) :Item_date(a) {}
longlong val_int();
char *func_name() const { return "from_days"; }
};
class Item_func_date_format :public Item_str_func
{
int fixed_length;
const bool date_or_time;
public:
Item_func_date_format(Item *a,Item *b,bool date_or_time_arg)
:Item_str_func(a,b),date_or_time(date_or_time_arg) {}
String *str(String *str);
char *func_name() const { return "date_format"; }
void fix_length_and_dec();
uint format_length(const String *format);
};
class Item_func_from_unixtime :public Item_func
{
public:
Item_func_from_unixtime(Item *a) :Item_func(a) {}
double val() { return (double) Item_func_from_unixtime::val_int(); }
longlong val_int();
String *str(String *str);
char *func_name() const { return "from_unixtime"; }
void fix_length_and_dec() { decimals=0; max_length=19; }
enum Item_result result_type () const { return STRING_RESULT; }
};
class Item_func_sec_to_time :public Item_str_func
{
public:
Item_func_sec_to_time(Item *item) :Item_str_func(item) {}
double val() { return (double) Item_func_sec_to_time::val_int(); }
longlong val_int();
String *str(String *);
void fix_length_and_dec() { maybe_null=1; max_length=13; }
char *func_name() const { return "sec_to_time"; }
};
class Item_date_add_interval :public Item_str_func
{
public:
enum interval_type { YEAR, MONTH, DAY, HOUR, MINUTE, SECOND,
YEAR_MONTH, DAY_HOUR, DAY_MINUTE, DAY_SECOND,
HOUR_MINUTE, HOUR_SECOND, MINUTE_SECOND};
Item_date_add_interval(Item *a,Item *b) :Item_str_func(a,b) {}
String *str(String *);
char *func_name() const { return "date_add_interval"; }
void fix_length_and_dec();
};
# 299 "item.h" 2
# 1 "item_uniq.h" 1
#pragma interface
# 1 "../include/queues.h" 1
extern "C" {
typedef struct st_queue {
byte **root;
uint elements;
uint max_elements;
uint offset_to_key;
int max_at_top;
int (*compare)(byte *,byte *);
} QUEUE;
int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
pbool max_at_top, int (*compare)(byte *,byte *));
void delete_queue(QUEUE *queue);
void queue_insert(QUEUE *queue,byte *element);
byte *queue_remove(QUEUE *queue,uint index);
void _downheap(QUEUE *queue,uint index);
}
# 7 "item_uniq.h" 2
class Item_func_unique_users :public Item_num_func
{
public:
Item_func_unique_users(Item *name_arg,int start,int end,List<Item> &list)
:Item_num_func(list) {}
double val() { return 0.0; }
void fix_length_and_dec() { decimals=0; max_length=6; }
};
class Item_sum_unique_users :public Item_sum_num
{
public:
Item_sum_unique_users(Item *name_arg,int start,int end,Item *item_arg)
:Item_sum_num(item_arg) {}
double val() { return 0.0; }
enum Sumfunctype sum_func () const {return UNIQUE_USERS_FUNC;}
void reset() {}
void add() {}
void reset_field() {}
void update_field(int offset) {}
bool fix_fields(THD *thd,struct st_table_list *tlist) { return 0;}
};
# 300 "item.h" 2
class Item_copy_string :public Item
{
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (16/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (21 preceding siblings ...)
1998-09-08 21:44 ` bug (18/26) Brian Grossman
@ 1998-09-08 21:44 ` Brian Grossman
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 21:44 UTC (permalink / raw)
To: Alexandre Oliva
bool zero_arg, bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
0, zero_arg,unsigned_arg)
{}
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types type() const { return FIELD_TYPE_SHORT;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_USHORT_INT : HA_KEYTYPE_SHORT_INT;}
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 2; }
void sql_type(String &str) const;
};
class Field_medium :public Field_num {
public:
Field_medium(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
bool zero_arg, bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
0, zero_arg,unsigned_arg)
{}
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types type() const { return FIELD_TYPE_INT24;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_UINT24 : HA_KEYTYPE_INT24; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 3; }
void sql_type(String &str) const;
};
class Field_long :public Field_num {
public:
Field_long(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
bool zero_arg, bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
0, zero_arg,unsigned_arg)
{}
Field_long(uint len_arg,bool maybe_null, char *field_name_arg,
struct st_table *table_arg,bool unsigned_arg)
:Field_num((char*) 0, len_arg, maybe_null ? (uchar*) "": 0,0,
NONE, field_name_arg, table_arg,0,0,unsigned_arg)
{}
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types type() const { return FIELD_TYPE_LONG;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_ULONG_INT : HA_KEYTYPE_LONG_INT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 4; }
void sql_type(String &str) const;
};
class Field_longlong :public Field_num {
public:
Field_longlong(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
bool zero_arg, bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
0, zero_arg,unsigned_arg)
{}
Field_longlong(uint len_arg,bool maybe_null, char *field_name_arg,
struct st_table *table_arg)
:Field_num((char*) 0, len_arg, maybe_null ? (uchar*) "": 0,0,
NONE, field_name_arg, table_arg,0,0,0)
{}
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types type() const { return FIELD_TYPE_LONGLONG;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_ULONGLONG : HA_KEYTYPE_LONGLONG; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 8; }
void sql_type(String &str) const;
};
class Field_float :public Field_num {
public:
Field_float(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
uint dec_arg,bool zero_arg,bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
dec_arg, zero_arg,unsigned_arg)
{}
enum_field_types type() const { return FIELD_TYPE_FLOAT;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_FLOAT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return sizeof(float); }
void sql_type(String &str) const;
};
class Field_double :public Field_num {
public:
Field_double(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
uint dec_arg,bool zero_arg,bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
dec_arg, zero_arg,unsigned_arg)
{}
Field_double(uint len_arg, bool maybe_null, char *field_name_arg,
struct st_table *table_arg, uint dec_arg)
:Field_num((char*) 0, len_arg, maybe_null ? (uchar*) "": 0, (uint) 0,
NONE, field_name_arg, table_arg,dec_arg,0,0)
{}
enum_field_types type() const { return FIELD_TYPE_DOUBLE;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_DOUBLE; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return sizeof(double); }
void sql_type(String &str) const;
};
class Field_null :public Field_str {
static uchar null[1];
public:
Field_null(char *ptr_arg, uint len_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg)
:Field_str(ptr_arg, len_arg, null, 1,
unireg_check_arg, field_name_arg, table_arg)
{}
enum_field_types type() const { return FIELD_TYPE_NULL;}
void store(const char *to,uint length) { null[0]=1; }
void store(double nr ) { null[0]=1; }
void store(longlong nr ) { null[0]=1; }
double val_real(void) { return 0.0;}
longlong val_int(void) { return 0;}
void val_str(String *value) { value->length(0); }
int cmp(const char *a,const char* b) { return 0;}
void sort_string(char *buff,uint length) {}
uint pack_length() const { return 0; }
void sql_type(String &str) const { str.set("null",4); }
uint size_of() const { return sizeof(*this); }
};
class Field_timestamp :public Field_num {
public:
Field_timestamp(char *ptr_arg, uint len_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg);
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 4; }
void sql_type(String &str) const;
bool store_for_compare() { return 1; }
inline void set_time()
{
long skr= (long) time((time_t*) 0);
{ *(( ptr )+3)=(( skr )); *(( ptr )+2)=((( skr ) >> 8)); *(( ptr )+1)=((( skr ) >> 16)); *(( ptr )+0)=((( skr ) >> 24)); } ;
}
inline long get_time()
{
long tmp;
{ int32 def_temp; ((byte*) &def_temp)[0]=( ptr )[0]; ((byte*) &def_temp)[1]=( ptr )[1]; ((byte*) &def_temp)[2]=( ptr )[2]; ((byte*) &def_temp)[3]=( ptr )[3]; ( tmp )=def_temp; } ;
return tmp;
}
void fill_and_store(char *from,uint len);
};
class Field_date :public Field_str {
public:
Field_date(char *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg)
:Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg)
{}
enum_field_types type() const { return FIELD_TYPE_DATE;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
enum Item_result cmp_type () const { return INT_RESULT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 4; }
void sql_type(String &str) const;
bool store_for_compare() { return 1; }
};
class Field_time :public Field_str {
public:
Field_time(char *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg)
:Field_str(ptr_arg, 8, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg)
{}
enum_field_types type() const { return FIELD_TYPE_TIME;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; }
enum Item_result cmp_type () const { return INT_RESULT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 3; }
void sql_type(String &str) const;
bool store_for_compare() { return 1; }
};
class Field_datetime :public Field_str {
public:
Field_datetime(char *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg)
:Field_str(ptr_arg, 19, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg)
{}
enum_field_types type() const { return FIELD_TYPE_DATETIME;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; }
enum Item_result cmp_type () const { return INT_RESULT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 8; }
void sql_type(String &str) const;
bool store_for_compare() { return 1; }
};
class Field_string :public Field_str {
bool binary_flag;
public:
Field_string(char *ptr_arg, uint len_arg,uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,bool binary_arg)
:binary_flag(binary_arg),
Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg)
{
if (binary_arg)
flags|= 128 ;
}
Field_string(uint len_arg,bool maybe_null, char *field_name_arg,
struct st_table *table_arg, bool binary_arg)
:binary_flag(binary_arg),
Field_str(__null ,len_arg, maybe_null ? (uchar*) "": 0,0,
NONE, field_name_arg, table_arg)
{
if (binary_arg)
flags|= 128 ;
}
enum_field_types type() const { return FIELD_TYPE_STRING;}
enum ha_base_keytype key_type() const
{ return binary_flag ? HA_KEYTYPE_BINARY : HA_KEYTYPE_TEXT; }
bool zero_pack() const { return 0; }
bool binary() const { return binary_flag; }
void reset(void) { memset(( ptr ),( ' ' ),( field_length )) ; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
void sql_type(String &str) const;
uint size_of() const { return sizeof(*this); }
};
class Field_blob :public Field_str {
uint packlength;
String value;
bool binary_flag;
public:
Field_blob(char *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,uint blob_pack_length,
bool binary_arg);
enum_field_types type() const { return FIELD_TYPE_BLOB;}
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return packlength+sizeof(char*); }
void store_length(ulong number);
ulong get_length(void);
bool binary() const { return binary_flag; }
inline void get_ptr(char **str)
{
memcpy(str,ptr+packlength,sizeof(char*));
}
inline void set_ptr(char *length,char *data)
{
memcpy(ptr,length,packlength);
memcpy(ptr+packlength,&data,sizeof(char*));
}
void sql_type(String &str) const;
void free() { value.free(); }
friend void field_conv(Field *to,Field *from);
uint size_of() const { return sizeof(*this); }
};
class Field_enum :public Field_str {
protected:
uint packlength;
public:
TYPELIB *typelib;
Field_enum(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,uint packlength_arg,
TYPELIB *typelib_arg)
:typelib(typelib_arg),packlength(packlength_arg),
Field_str(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg)
{
flags|= 256 ;
}
enum_field_types type() const { return FIELD_TYPE_STRING; }
enum Item_result cmp_type () const { return INT_RESULT; }
enum ha_base_keytype key_type() const;
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return packlength; }
void store_type(ulonglong value);
void sql_type(String &str) const;
uint size_of() const { return sizeof(*this); }
enum_field_types real_type() const { return FIELD_TYPE_ENUM; }
bool optimize_range() { return 0; }
};
class Field_set :public Field_enum {
public:
Field_set(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,uint packlength_arg,
TYPELIB *typelib_arg)
:Field_enum(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg,
table_arg, packlength_arg,
typelib_arg)
{}
void store(const char *to,uint length);
void store(double nr) { store((longlong) nr); }
void store(longlong nr);
void val_str(String*);
void sql_type(String &str) const;
enum_field_types real_type() const { return FIELD_TYPE_SET; }
};
class create_field :public Sql_alloc {
public:
char *field_name;
char *change;
Item *def;
enum enum_field_types sql_type;
uint length,decimals,flags,pack_length;
Field::utype unireg_check;
TYPELIB *interval;
Field *field;
uint8 row,col,sc_length;
uint offset,pack_flag;
create_field() {}
create_field(Field *field);
};
class Send_field {
public:
char *table_name,*col_name;
uint length,flags,decimals;
enum_field_types type;
Send_field() {}
};
class Copy_field :public Sql_alloc {
void (*get_copy_func(Field *to,Field *from))(Copy_field *);
public:
char *from_ptr,*to_ptr;
uchar *from_null_ptr,*to_null_ptr;
my_bool *null_row;
uint from_bit,to_bit;
uint from_length,to_length;
Field *from_field,*to_field;
String tmp;
Copy_field() {}
~Copy_field() {}
void set(Field *to,Field *from,bool save);
void set(char *to,Field *from);
void (*do_copy)(Copy_field *);
void (*do_copy2)(Copy_field *);
};
Field *make_field(char *ptr, uint field_length,
uchar *null_pos, uint null_bit,
uint pack_flag, Field::utype unireg_check,
TYPELIB *interval, char *field_name,
struct st_table *table);
uint pack_length_to_packflag(uint type);
uint calc_pack_length(enum_field_types type,uint length);
bool set_field_to_null(Field *field);
uint find_enum(TYPELIB *typelib,const char *x, uint length);
ulonglong find_set(TYPELIB *typelib,const char *x, uint length);
# 130 "mysql_priv.h" 2
# 1 "sql_udf.h" 1
#pragma interface
typedef struct st_udf_func
{
char *name;
int name_length;
Item_result returns;
char *dl;
void *dlhandle;
void *func;
void *func_init;
void *func_deinit;
ulong usage_count;
} udf_func;
# 131 "mysql_priv.h" 2
# 1 "item.h" 1
#pragma interface
struct st_table_list;
void item_init(void);
class Item :public Sql_alloc {
public:
enum Type {FIELD_ITEM,FUNC_ITEM,SUM_FUNC_ITEM,STRING_ITEM,
INT_ITEM,REAL_ITEM,NULL_ITEM,VARBIN_ITEM,
COPY_STR_ITEM,FIELD_AVG_ITEM,
PROC_ITEM,COND_ITEM,REF_ITEM,FIELD_STD_ITEM};
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE };
my_bool maybe_null;
my_bool null_value;
my_bool binary;
my_bool with_sum_func;
uint8 marker,decimals;
uint max_length;
my_string name;
String str_value;
Item *next;
Item();
virtual ~Item() { name=0; }
void set_name(char* str,uint length=0);
void init_make_field(Send_field *tmp_field,enum enum_field_types type);
virtual bool fix_fields(THD *,struct st_table_list *);
virtual bool save_in_field(Field *field);
virtual void save_org_in_field(Field *field)
{ (void) save_in_field(field); }
virtual bool send(String *str);
virtual bool eq(const Item *) const;
virtual Item_result result_type () const { return REAL_RESULT; }
virtual enum Type type() const =0;
virtual double val()=0;
virtual longlong val_int()=0;
virtual String *str(String*)=0;
virtual void make_field(Send_field *field)=0;
virtual Field *tmp_table_field() { return 0; }
virtual char *full_name() { return name ? name : "???"; }
virtual double val_result() { return val(); }
virtual longlong val_int_result() { return val_int(); }
virtual String *str_result(String* tmp) { return str(tmp); }
virtual table_map used_tables() const { return (table_map) 0L; }
virtual bool basic_const_item() const { return 0; }
virtual Item *new_item() { return 0; }
virtual cond_result eq_cmp_result() const { return COND_OK; }
inline uint float_length(uint decimals_par) const {return (13+decimals_par);}
inline bool const_item() const { return used_tables() == 0; }
virtual void print(String *str) { str->append(full_name()); }
virtual void update_used_tables() {}
virtual void split_sum_func(List<Item> &fields) { return; }
};
class Item_ident :public Item
{
public:
char *table_name,*field_name;
Item_ident(char *table_name_par,char *field_name_par)
:table_name(table_name_par),field_name(field_name_par)
{ name = field_name_par; }
char *full_name();
};
class Item_field :public Item_ident
{
void set_field(Field *field);
public:
Field *field,*result_field;
Item_field(char *table_name_par,char *field_name_par)
:field(0),result_field(0),Item_ident(table_name_par,field_name_par) {}
Item_field(Field *field);
enum Type type() const { return FIELD_ITEM; }
bool eq(const Item *item) const;
double val();
longlong val_int();
String *str(String*);
double val_result();
longlong val_int_result();
String *str_result(String* tmp);
bool send(String *str) { return result_field->send(str); }
void make_field(Send_field *field);
bool fix_fields(THD *,struct st_table_list *);
bool save_in_field(Field *field);
void save_org_in_field(Field *field);
table_map used_tables() const;
enum Item_result result_type () const
{
return field->result_type();
}
Field *tmp_table_field() { return result_field; }
};
class Item_null :public Item
{
public:
Item_null(char *name_par=0)
{ maybe_null=null_value= (1) ; name= name_par ? name_par : "NULL";}
enum Type type() const { return NULL_ITEM; }
bool eq(const Item *item) const;
double val();
longlong val_int();
String *str(String *str);
void make_field(Send_field *field);
bool save_in_field(Field *field);
enum Item_result result_type () const
{ return STRING_RESULT; }
bool send(String *str);
bool basic_const_item() const { return 1; }
Item *new_item() { return new Item_null(name); }
};
class Item_int :public Item
{
public:
const longlong value;
Item_int(int32 i,uint length=11) :value((longlong) i)
{ max_length=length;}
Item_int(longlong i,uint length=21) :value(i)
{ max_length=length;}
Item_int(char *str,longlong i,uint length) :value(i)
{ max_length=length; name=str;}
Item_int(const char *str) :
value(str[0] == '-' ? strtoll(str,__null ,10) :
(longlong) strtoull(str,__null ,10))
{ max_length=strlen(str); name=(char*) str;}
enum Type type() const { return INT_ITEM; }
virtual enum Item_result result_type () const { return INT_RESULT; }
longlong val_int() { return value; }
double val() { return (double) value; }
String *str(String*);
void make_field(Send_field *field);
bool save_in_field(Field *field);
bool basic_const_item() const { return 1; }
Item *new_item() { return new Item_int(name,value,max_length); }
void print(String *str);
};
class Item_real :public Item
{
public:
const double value;
Item_real(const char *str) :value(atof(str))
{
name=(char*) str;
this->decimals=nr_of_decimals(str);
max_length=strlen(str);
}
Item_real(const char *str,double val,uint decimal_par,uint length) :value(val)
{
name=(char*) str;
decimals=decimal_par;
max_length=length;
}
Item_real(double value_par) :value(value_par) {}
bool save_in_field(Field *field);
enum Type type() const { return REAL_ITEM; }
double val() { return value; }
longlong val_int() { return (longlong) (value+0.5);}
String *str(String*);
void make_field(Send_field *field);
bool basic_const_item() const { return 1; }
Item *new_item() { return new Item_real(name,value,decimals,max_length); }
};
class Item_string :public Item
{
public:
Item_string(const char *str,uint length)
{
str_value.set(str,length);
max_length=length;
name=(char*) str_value.ptr();
}
Item_string(char *name_par,const char *str,uint length)
{
str_value.set(str,length);
max_length=length;
name=name_par;
}
~Item_string() {}
enum Type type() const { return STRING_ITEM; }
double val() { return atof(str_value.ptr()); }
longlong val_int() { return strtoll(str_value.ptr(),__null ,10); }
String *str(String*) { return (String*) &str_value; }
bool save_in_field(Field *field);
void make_field(Send_field *field);
enum Item_result result_type () const { return STRING_RESULT; }
bool basic_const_item() const { return 1; }
Item *new_item() { return new Item_string(name,str_value.ptr(),max_length); }
String *const_string() { return &str_value; }
inline void append(char *str,uint length) { str_value.append(str,length); }
};
class Item_empty_string :public Item_string
{
public:
Item_empty_string(char *header,uint length) :Item_string("",0)
{ name=header; max_length=length;}
};
class Item_varbinary :public Item
{
public:
Item_varbinary(const char *str,uint str_length);
~Item_varbinary() {}
enum Type type() const { return VARBIN_ITEM; }
double val() { return (double) val_int(); }
longlong val_int();
String *str(String*) { return &str_value; }
bool save_in_field(Field *field);
void make_field(Send_field *field);
enum Item_result result_type () const { return STRING_RESULT; }
};
class Item_result_field :public Item
{
public:
Field *result_field;
Item_result_field() :result_field(0) {}
Field *tmp_table_field() { return result_field; }
};
class Item_ref :public Item_ident
{
Item **ref;
public:
Item_ref(char *table_name_par,char *field_name_par)
:ref(0), Item_ident(table_name_par,field_name_par) {}
Item_ref(Item **item, char *table_name_par,char *field_name_par)
:ref(item), Item_ident(table_name_par,field_name_par) {}
enum Type type() const { return REF_ITEM; }
bool eq(const Item *item) const { return (*ref)->eq(item); }
~Item_ref() { if (ref) delete *ref; }
double val()
{
double tmp=(*ref)->val_result();
null_value=(*ref)->null_value;
return tmp;
}
longlong val_int()
{
longlong tmp=(*ref)->val_int_result();
null_value=(*ref)->null_value;
return tmp;
}
String *str(String* tmp)
{
tmp=(*ref)->str_result(tmp);
null_value=(*ref)->null_value;
return tmp;
}
bool send(String *tmp) { return (*ref)->send(tmp); }
void make_field(Send_field *field) { (*ref)->make_field(field); }
bool fix_fields(THD *,struct st_table_list *);
bool save_in_field(Field *field) { return (*ref)->save_in_field(field); }
void save_org_in_field(Field *field) { (*ref)->save_org_in_field(field); }
enum Item_result result_type () const { return (*ref)->result_type(); }
table_map used_tables() const { return (*ref)->used_tables(); }
};
# 1 "item_sum.h" 1
#pragma interface
class Item_sum :public Item_result_field
{
public:
enum Sumfunctype {COUNT_FUNC,SUM_FUNC,AVG_FUNC,MIN_FUNC,MAX_FUNC,
UNIQUE_USERS_FUNC,STD_FUNC,SUM_BIT_FUNC };
Item *item;
bool quick_group;
Item_sum(Item *item_par) :item(item_par),quick_group(1) {}
~Item_sum() { delete item; result_field=0;}
enum Type type() const { return SUM_FUNC_ITEM; }
virtual enum Sumfunctype sum_func () const=0;
virtual void reset()=0;
virtual void add()=0;
virtual void reset_field()=0;
virtual void update_field(int offset)=0;
virtual bool keep_field_type(void) const { return 0; }
virtual void fix_length_and_dec() { maybe_null=1; null_value=1; }
virtual char *func_name() const { return "?"; }
ulong used_tables() const { return ~(table_map) 0; }
void update_used_tables() { }
void make_field(Send_field *field);
void print(String *str);
};
class Item_sum_num :public Item_sum
{
public:
Item_sum_num(Item *item_par) :Item_sum(item_par) {}
bool fix_fields(THD *,struct st_table_list *);
longlong val_int() { return (longlong) val(); }
String *str(String*str);
void reset_field();
};
class Item_sum_int :public Item_sum_num
{
public:
Item_sum_int(Item *item_par) :Item_sum_num(item_par) {}
double val() { return (double) val_int(); }
String *str(String*str);
enum Item_result result_type () const { return INT_RESULT; }
};
class Item_sum_sum :public Item_sum_num
{
double sum;
void fix_length_and_dec() { maybe_null=null_value=0; }
public:
Item_sum_sum(Item *item_par) :Item_sum_num(item_par),sum(0.0) {}
enum Sumfunctype sum_func () const {return SUM_FUNC;}
void reset();
void add();
double val();
void reset_field();
void update_field(int offset);
char *func_name() const { return "sum"; }
};
class Item_sum_count :public Item_sum_int
{
ulong count;
void fix_length_and_dec()
{ decimals=0; max_length=11; maybe_null=null_value=0; }
public:
Item_sum_count(Item *item_par) :Item_sum_int(item_par),count(0) {}
enum Sumfunctype sum_func () const {return COUNT_FUNC;}
void reset();
void add();
longlong val_int();
void reset_field();
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: bug (15/26)
1998-09-01 20:17 ` bug Alexandre Oliva
` (16 preceding siblings ...)
1998-09-08 20:53 ` bug (7/26) Brian Grossman
@ 1998-09-08 21:44 ` Brian Grossman
1998-09-08 21:44 ` bug (17/26) Brian Grossman
` (4 subsequent siblings)
22 siblings, 0 replies; 26+ messages in thread
From: Brian Grossman @ 1998-09-08 21:44 UTC (permalink / raw)
To: Alexandre Oliva
static void *operator new(size_t size) { return (void*) sql_alloc(size); }
static void operator delete(void *ptr,size_t size )
{ sql_element_free(ptr); }
~String() { free(); }
inline uint length() const { return str_length;}
inline uint alloced_length() const { return Alloced_length;}
inline char& operator [] (uint i) const { return Ptr[i]; }
inline void length(uint len) { str_length=len ; }
inline bool is_empty() { return (str_length == 0); }
inline const char *ptr() const { return Ptr; }
inline char *c_ptr()
{
if (!Ptr || Ptr[str_length])
(void) realloc(str_length);
return Ptr;
}
inline char *c_ptr_quick()
{
if (Ptr && str_length < Alloced_length)
Ptr[str_length]=0;
return Ptr;
}
void set(String &str,uint offset,uint length)
{
free();
Ptr=(char*) str.ptr()+offset; str_length=length; alloced=0;
if (str.Alloced_length)
Alloced_length=str.Alloced_length-offset;
else
Alloced_length=0;
}
inline void set(char *str,uint length)
{
free();
Ptr=(char*) str; str_length=length; Alloced_length=length ; alloced=0;
}
inline void set(const char *str,uint length)
{
free();
Ptr=(char*) str; str_length=length; Alloced_length=0 ; alloced=0;
}
inline void set_quick(char *str,uint length)
{
if (!alloced)
{
Ptr=(char*) str; str_length=length; Alloced_length=length;
}
}
void set(longlong num);
void set(double num,uint decimals=2);
inline void free()
{
if (alloced)
{
alloced=0;
my_no_flags_free( Ptr ) ;
Ptr=0;
}
}
inline bool alloc(uint length)
{
if (length < Alloced_length)
return 0;
return real_alloc(length);
}
bool real_alloc(uint length);
bool realloc(uint length);
inline void shrink(uint length)
{
if (length < Alloced_length)
{
char *new_ptr;
if (!(new_ptr=my_realloc(Ptr,length,(myf) ( 0 ) )))
{
(void) my_no_flags_free( Ptr ) ;
real_alloc(length);
}
else
{
Ptr=new_ptr;
Alloced_length=length;
}
}
}
bool is_alloced() { return alloced; }
inline String& operator = (const String &s)
{
if (&s != this)
{
free();
Ptr=s.Ptr ; str_length=s.str_length ; Alloced_length=s.Alloced_length;
alloced=0;
}
return *this;
}
void copy();
void copy(const String &s);
void copy(const char *s,uint length);
void append(const String &s);
void append(const char *s,uint length=0);
int strstr(const String &search,uint offset=0);
int strrstr(const String &search,uint offset=0);
void replace(uint offset,uint length,const String &to);
inline bool append(char chr)
{
if (str_length < Alloced_length)
{
Ptr[str_length++]=chr;
}
else
{
if (realloc(str_length+1))
return 1;
Ptr[str_length++]=chr;
}
return 0;
}
void fill(uint max_length,char fill);
void strip_sp();
inline void caseup() { ::caseup(Ptr,str_length); }
inline void casedn() { ::casedn(Ptr,str_length); }
friend int sortcmp(const String *a,const String *b);
friend int stringcmp(const String *a,const String *b);
friend String *copy_if_not_alloced(String *a,String *b,uint length);
friend int wild_case_compare(String &match,String &wild);
};
# 125 "mysql_priv.h" 2
# 1 "sql_list.h" 1
#pragma interface
class Sql_alloc
{
public:
static void *operator new(size_t size) {return (void*) sql_alloc(size); }
static void operator delete(void *ptr ,
size_t size ) {}
inline Sql_alloc() {};
inline ~Sql_alloc() {};
};
class base_list :public Sql_alloc {
protected:
class list_node :public Sql_alloc
{
public:
list_node *next;
void *info;
list_node(void *info_par,list_node *next_par) : next(next_par),info(info_par) {}
friend class base_list;
friend class base_list_iterator;
};
list_node *first,**last;
public:
uint elements;
inline void empty() { elements=0; first=0; last=&first;}
inline base_list() { empty(); }
inline base_list(const base_list &tmp) :Sql_alloc()
{
elements=tmp.elements;
first=tmp.first;
last=tmp.last;
}
inline bool push_back(void *info)
{
if (((*last)=new list_node(info,0)))
{
last= &(*last)->next;
elements++;
return 0;
}
return 1;
}
inline bool push_front(void *info)
{
list_node *node=new list_node(info,first);
if (node)
{
if (!first)
last= &node->next;
first=node;
elements++;
return 0;
}
return 1;
}
void remove(list_node **prev)
{
list_node *node=(*prev)->next;
delete *prev;
*prev=node;
if (!--elements)
last= &first;
}
inline void *pop(void)
{
if (!first) return 0;
list_node *tmp=first;
first=first->next;
if (!--elements)
last= &first;
return tmp->info;
}
inline void *head() { return first ? first->info : 0; }
inline void **head_ref() { return first ? &first->info : 0; }
friend class base_list_iterator;
protected:
void after(void *info,list_node *node)
{
list_node *new_node=new list_node(info,node->next);
node->next=new_node;
elements++;
}
};
class base_list_iterator
{
base_list *list;
base_list::list_node **el,**prev,*current;
public:
base_list_iterator(base_list &list_par) :list(&list_par),el(&list_par.first),
prev(0),current(0)
{}
inline void *next(void)
{
prev=el;
if (!(current= *el))
return 0;
el= ¤t->next;
return current->info;
}
inline void rewind(void)
{
el= &list->first;
}
void *replace(void *element)
{
void *tmp=current->info;
current->info=element;
return tmp;
}
void *replace(base_list &new_list)
{
void *ret_value=current->info;
if (new_list.first)
{
*new_list.last=current->next;
current->info=new_list.first->info;
current->next=new_list.first->next;
list->elements+=new_list.elements-1;
}
return ret_value;
}
inline void remove(void)
{
list->remove(prev);
el=prev;
current=0;
}
void after(void *element)
{
list->after(element,current);
current=current->next;
el= ¤t->next;
}
inline void **ref()
{
return ¤t->info;
}
};
template <class T> class List :public base_list
{
public:
inline List() :base_list() {}
inline List(const List<T> &tmp) :base_list(tmp) {}
inline bool push_back(T *a) { return base_list::push_back(a); }
inline bool push_front(T *a) { return base_list::push_front(a); }
inline T* head() {return (T*) base_list::head(); }
inline T* pop() {return (T*) base_list::pop(); }
void delete_elements(void)
{
list_node *element,*next;
for (element=first; element ; element=next)
{
next=element->next;
delete (T*) element->info;
}
empty();
}
};
template <class T> class List_iterator :public base_list_iterator
{
public:
List_iterator(List<T> &a) : base_list_iterator(a) {}
inline T* operator++(int) { return (T*) base_list_iterator::next(); }
inline void rewind(void) { base_list_iterator::rewind(); }
inline T *replace(T *a) { return (T*) base_list_iterator::replace(a); }
inline T *replace(List<T> &a) { return (T*) base_list_iterator::replace(a); }
inline void remove(void) { base_list_iterator::remove(); }
inline void after(T *a) { base_list_iterator::after(a); }
inline T** ref() { return (T**) base_list_iterator::ref(); }
};
struct ilink {
struct ilink **prev,*next;
inline ilink()
{
prev=0; next=0;
}
inline void unlink()
{
if (prev) *prev= next;
if (next) next->prev=prev;
prev=0 ; next=0;
}
virtual ~ilink() { unlink(); }
};
template <class T> class I_List_iterator;
class base_ilist {
public:
struct ilink *first;
base_ilist() { first=0; }
inline void append(ilink *a)
{
if (first)
first->prev=&a->next;
a->next=first; a->prev=&first; first=a;
}
inline struct ilink *get()
{
struct ilink *link=first;
if (link)
link->unlink();
return link;
}
friend class base_list_iterator;
};
class base_ilist_iterator
{
base_ilist *list;
struct ilink *el,*current;
public:
base_ilist_iterator(base_ilist &list_par) :list(&list_par),el(list_par.first),current(0) {}
void *next(void)
{
current=el;
if (!el) return 0;
el=el->next;
return current;
}
};
template <class T>
class I_List :private base_ilist {
public:
I_List() :base_ilist() {}
void append(T* a) { base_ilist::append(a); }
inline T* get() { return (T*) base_ilist::get(); }
friend class I_List_iterator<T>;
};
template <class T> class I_List_iterator :public base_ilist_iterator
{
public:
I_List_iterator(I_List<T> &a) : base_ilist_iterator(a) {}
inline T* operator++(int) { return (T*) base_ilist_iterator::next(); }
};
# 126 "mysql_priv.h" 2
# 1 "sql_map.h" 1
#pragma interface
class mapped_files :public ilink {
byte *map;
ulong size;
char *name;
File file;
int error;
uint use_count;
public:
mapped_files(const my_string name,byte *magic,uint magic_length);
~mapped_files();
friend class mapped_file;
friend mapped_files *map_file(const my_string name,byte *magic,
uint magic_length);
friend void unmap_file(mapped_files *map);
};
class mapped_file
{
mapped_files *file;
public:
mapped_file(const my_string name,byte *magic,uint magic_length)
{
file=map_file(name,magic,magic_length);
}
~mapped_file()
{
unmap_file(file);
}
byte *map()
{
return file->map;
}
};
# 127 "mysql_priv.h" 2
# 1 "../include/my_base.h" 1
# 24 "../include/my_base.h"
enum ha_rkey_function {
HA_READ_KEY_EXACT,
HA_READ_KEY_OR_NEXT,
HA_READ_KEY_OR_PREV,
HA_READ_AFTER_KEY,
HA_READ_BEFORE_KEY
};
enum ha_extra_function {
HA_EXTRA_NORMAL=0,
HA_EXTRA_QUICK=1,
HA_EXTRA_RESET=2,
HA_EXTRA_CACHE=3,
HA_EXTRA_NO_CACHE=4,
HA_EXTRA_NO_READCHECK=5,
HA_EXTRA_READCHECK=6,
HA_EXTRA_KEYREAD=7,
HA_EXTRA_NO_KEYREAD=8,
HA_EXTRA_NO_USER_CHANGE=9,
HA_EXTRA_KEY_CACHE=10,
HA_EXTRA_NO_KEY_CACHE=11,
HA_EXTRA_WAIT_LOCK=12,
HA_EXTRA_NO_WAIT_LOCK=13,
HA_EXTRA_WRITE_CACHE=14,
HA_EXTRA_FLUSH_CACHE=15,
HA_EXTRA_NO_KEYS=16,
HA_EXTRA_KEYREAD_CHANGE_POS=17,
HA_EXTRA_REMEMBER_POS=18,
HA_EXTRA_RESTORE_POS=19,
HA_EXTRA_REINIT_CACHE=20,
HA_EXTRA_FORCE_REOPEN=21
};
enum ha_panic_function {
HA_PANIC_CLOSE,
HA_PANIC_WRITE,
HA_PANIC_READ
};
enum ha_base_keytype {
HA_KEYTYPE_END=0,
HA_KEYTYPE_TEXT=1,
HA_KEYTYPE_BINARY=2,
HA_KEYTYPE_SHORT_INT=3,
HA_KEYTYPE_LONG_INT=4,
HA_KEYTYPE_FLOAT=5,
HA_KEYTYPE_DOUBLE=6,
HA_KEYTYPE_NUM=7,
HA_KEYTYPE_USHORT_INT=8,
HA_KEYTYPE_ULONG_INT=9,
HA_KEYTYPE_LONGLONG=10,
HA_KEYTYPE_ULONGLONG=11,
HA_KEYTYPE_INT24=12,
HA_KEYTYPE_UINT24=13,
HA_KEYTYPE_INT8=14
};
enum en_fieldtype {
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIPP_ENDSPACE,FIELD_SKIPP_PRESPACE,
FIELD_SKIPP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO
};
typedef ulong ha_rows;
# 128 "mysql_priv.h" 2
# 1 "table.h" 1
typedef ulong table_map;
typedef ulong key_map;
class Item;
typedef struct st_order {
struct st_order *next;
Item **item;
bool asc;
bool free_me;
Field *field;
char *buff;
} ORDER;
typedef struct st_table {
byte* file;
File dfile;
Field **field;
byte *record[3];
uint fields;
uint reclength;
uint rec_buff_length;
uint keys,key_parts,max_key_length;
uint null_fields;
uint blob_fields;
KEY *key_info;
TYPELIB keynames;
KEYFILE_INFO keyfile_info;
ulong max_records;
ulong reloc;
TYPELIB fieldnames;
TYPELIB *intervals;
enum db_type db_type;
uint db_capabilities;
uint db_create_options;
uint db_record_offset;
uint db_stat;
uint status;
uint system;
uint time_stamp;
uint next_number_index;
int locked;
my_bool copy_blobs;
my_bool null_row;
my_bool maybe_null,outer_join;
my_bool distinct,tmp_table,const_table;
Field *next_number_field,
*found_next_number_field,
*timestamp_field;
my_string info;
REGINFO reginfo;
MEM_ROOT mem_root;
char *table_cache_key;
char *table_name,*real_name;
uint key_length;
uint tablenr,used_fields;
table_map map;
ulong version;
uchar *null_flags;
IO_CACHE *io_cache;
byte *record_pointers;
ulong found_records;
ORDER *group;
THD *in_use;
struct st_table *next,*prev;
} TABLE;
typedef struct st_table_list {
struct st_table_list *next;
char *db,*name,*real_name;
uint flags;
TABLE *table;
Item *on_expr;
struct st_table_list *natural_join;
} TABLE_LIST;
# 129 "mysql_priv.h" 2
# 1 "field.h" 1
#pragma interface
class Send_field;
struct st_cache_field;
class Field :public Sql_alloc {
Field(const Item &);
void operator=(Field &);
public:
enum utype { NONE,DATE,SHIELD,NOEMPTY,CASEUP,PNR,BGNR,PGNR,YES,NO,REL,
CHECK,EMPTY,UNKNOWN,CASEDN,NEXT_NUMBER,INTERVAL_FIELD,BIT_FIELD,
TIMESTAMP_FIELD,CAPITALIZE,BLOB_FIELD};
char *ptr;
protected:
uchar *null_ptr;
uint8 null_bit;
public:
struct st_table *table;
uint field_length;
ulong query_id;
ulong key_parts;
char *table_name,*field_name;
utype unireg_check;
uint flags;
Field(char *ptr_arg,uint length_arg,uchar *null_ptr_arg,uint null_bit_arg,
utype unireg_check_arg,char *field_name_arg,
struct st_table *table_arg);
virtual ~Field() {}
virtual void store(const char *to,uint length)=0;
virtual void store(double nr)=0;
virtual void store(longlong nr)=0;
virtual double val_real(void)=0;
virtual longlong val_int(void)=0;
virtual void val_str(String*)=0;
virtual Item_result result_type () const=0;
virtual Item_result cmp_type () const { return result_type(); }
virtual bool eq(Field *field) { return ptr == field->ptr; }
virtual uint pack_length() const { return field_length; }
virtual void reset(void) { memset(( ptr ),0,( pack_length() )) ; }
virtual bool binary() const { return 1; }
virtual bool zero_pack() const { return 1; }
virtual enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; }
virtual enum_field_types type() const =0;
virtual enum_field_types real_type() const { return type(); }
inline int cmp(const char *str) { return cmp(ptr,str); }
virtual int cmp(const char *,const char *)=0;
virtual void sql_type(String &str) const =0;
virtual uint size_of() const =0;
inline bool is_null(uint offset=0)
{ return null_ptr ? (null_ptr[offset] & null_bit ? 1 : table->null_row) : table->null_row; }
inline void set_null(int offset=0)
{ if (null_ptr) null_ptr[offset]|= null_bit; }
inline void set_notnull(int offset=0)
{ if (null_ptr) null_ptr[offset]&= ~null_bit; }
inline bool maybe_null(void) { return null_ptr != 0 || table->maybe_null; }
virtual void make_field(Send_field *)=0;
virtual void sort_string(char *buff,uint length)=0;
virtual bool optimize_range() { return 1; }
virtual bool store_for_compare() { return 0; }
inline Field *new_field(struct st_table *new_table)
{
Field *tmp= (Field*) sql_memdup((char*) this,size_of());
tmp->table=new_table;
return tmp;
}
inline void move_field(char *ptr_arg,uchar *null_ptr_arg,uint null_bit_arg)
{
ptr=ptr_arg; null_ptr=null_ptr_arg; null_bit=null_bit_arg;
}
inline void move_field(char *ptr_arg) { ptr=ptr_arg; }
inline void get_image(char *buff,uint length)
{ memcpy(buff,ptr,length); }
inline void set_image(char *buff,uint length)
{ memcpy(ptr,buff,length); }
inline int cmp_image(char *buff,uint length)
{
if (binary())
return memcmp(ptr,buff,length);
else
return my_casecmp(ptr,buff,length);
}
inline longlong val_int_offset(uint offset)
{
ptr+=offset;
longlong tmp=val_int();
ptr-=offset;
return tmp;
}
bool send(String *packet);
uint offset();
void copy_from_tmp(int offset);
uint fill_cache_field(struct st_cache_field *copy);
friend bool reopen_table(THD *,struct st_table *,bool);
friend class Copy_field;
friend class Item_avg_field;
friend class Item_std_field;
friend class Item_sum_num;
friend class Item_sum_sum;
friend class Item_sum_str;
friend class Item_sum_count;
friend class Item_sum_avg;
friend class Item_sum_std;
friend class Item_sum_min;
friend class Item_sum_max;
};
class Field_num :public Field {
public:
const uint8 decimals;
bool zerofill,unsigned_flag;
Field_num(char *ptr_arg,uint len_arg, uchar *null_ptr_arg, uint null_bit_arg,
utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
uint dec_arg,bool zero_arg,bool unsigned_arg)
:Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg),
decimals(dec_arg),zerofill(zero_arg),unsigned_flag(unsigned_arg)
{
if (zerofill)
flags|= 64 ;
if (unsigned_flag)
flags|= 32 ;
}
Item_result result_type () const { return REAL_RESULT; }
void prepend_zeros(String *value);
void add_zerofill_and_unsigned(String &res) const;
friend class create_field;
void make_field(Send_field *);
uint size_of() const { return sizeof(*this); }
};
class Field_str :public Field {
public:
Field_str(char *ptr_arg,uint len_arg, uchar *null_ptr_arg, uint null_bit_arg,
utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg)
:Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg)
{}
Item_result result_type () const { return STRING_RESULT; }
friend class create_field;
void make_field(Send_field *);
uint size_of() const { return sizeof(*this); }
};
class Field_decimal :public Field_num {
public:
Field_decimal(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
uint dec_arg,bool zero_arg,bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
dec_arg, zero_arg,unsigned_arg)
{}
enum_field_types type() const { return FIELD_TYPE_DECIMAL;}
enum ha_base_keytype key_type() const
{ return zerofill ? HA_KEYTYPE_BINARY : HA_KEYTYPE_NUM; }
void reset(void);
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
void overflow(bool negative);
bool zero_pack() const { return 0; }
void sql_type(String &str) const;
};
class Field_tiny :public Field_num {
public:
Field_tiny(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
bool zero_arg, bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg, table_arg,
0, zero_arg,unsigned_arg)
{}
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types type() const { return FIELD_TYPE_TINY;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_BINARY : HA_KEYTYPE_INT8; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
double val_real(void);
longlong val_int(void);
void val_str(String*);
int cmp(const char *,const char*);
void sort_string(char *buff,uint length);
uint pack_length() const { return 1; }
void sql_type(String &str) const;
};
class Field_short :public Field_num {
public:
Field_short(char *ptr_arg, uint len_arg, uchar *null_ptr_arg,
uint null_bit_arg,
enum utype unireg_check_arg, char *field_name_arg,
struct st_table *table_arg,
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~1998-09-08 21:44 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-31 13:07 bug Brian Grossman
1998-09-01 20:17 ` bug Alexandre Oliva
1998-09-08 16:10 ` bug (9/26) Brian Grossman
1998-09-08 16:10 ` bug (8/26) Brian Grossman
1998-09-08 17:52 ` bug (4/26) Brian Grossman
1998-09-08 17:52 ` bug (2/26) Brian Grossman
1998-09-08 17:52 ` bug (6/26) Brian Grossman
1998-09-08 17:52 ` bug (1/26) Brian Grossman
1998-09-08 19:36 ` Alexandre Oliva
1998-09-08 17:52 ` bug (5/26) Brian Grossman
1998-09-08 17:52 ` bug (12/26) Brian Grossman
1998-09-08 19:36 ` bug (3/26) Brian Grossman
1998-09-08 19:36 ` bug (14/26) Brian Grossman
1998-09-08 19:36 ` bug (10/26) Brian Grossman
1998-09-08 20:53 ` bug (13/26) Brian Grossman
1998-09-08 20:53 ` bug (24/26) Brian Grossman
1998-09-08 20:53 ` bug (11/26) Brian Grossman
1998-09-08 20:53 ` bug (26/26) Brian Grossman
1998-09-08 20:53 ` bug (23/26) Brian Grossman
1998-09-08 20:53 ` bug (7/26) Brian Grossman
1998-09-08 21:44 ` bug (15/26) Brian Grossman
1998-09-08 21:44 ` bug (17/26) Brian Grossman
1998-09-08 21:44 ` bug (25/26) Brian Grossman
1998-09-08 21:44 ` bug (19/26) Brian Grossman
1998-09-08 21:44 ` bug (18/26) Brian Grossman
1998-09-08 21:44 ` bug (16/26) Brian Grossman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).