Re: Default 1 == Default 16777216?
Obvious stupid question: What happens when you specify the value as 16777216? Since you are running on a SPARC, I'm sure you will end up with the correct value (1) in the space. If that works, there is definitely an endism problem. Dave Philip Molter wrote: Description: When I do this: mysqlcreate table test_default ( testint int not null default 1 ); mysqldesc test_default; I get: +-+-+--+-+--+---+ | Field | Type| Null | Key | Default | Extra | +-+-+--+-+--+---+ | testint | int(11) | | | 16777216 | | +-+-+--+-+--+---+ 1 row in set (0.00 sec) Why does my default not go in as '1'. I've tried it with and without quotes. This is vexing. Is there something obvious that I'm just not doing correctly? How-To-Repeat: See above Fix: Don't know. I'm looking for verification that the problem exists. Submitter-Id: submitter ID Originator: Philip Molter Organization: Texas.Net MySQL support: none Synopsis: Default 1 == Default 16777216 Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.46 (Source distribution) Environment: System: SunOS 5.8 Generic_108528-12 sun4u sparc SUNW,Ultra-80 Architecture: sun4 Some paths: /usr/bin/perl /usr/ccs/bin/make /usr/local/bin/gcc /usr/ucb/cc GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) Compilation info: CC='gcc' CFLAGS='' CXX='gcc' CXXFLAGS='' LDFLAGS='' This build was compiled with the specs used on MySQL's web site for Solaris (SunOS, actually) builds. LIBC: -rw-r--r-- 1 root bin 1763908 Nov 16 16:42 /lib/libc.a lrwxrwxrwx 1 root root 11 Nov 20 13:29 /lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1136748 Nov 16 16:42 /lib/libc.so.1 -rw-r--r-- 1 root bin 1763908 Nov 16 16:42 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Nov 20 13:29 /usr/lib/libc.so - ./libc.so.1 -rwxr-xr-x 1 root bin 1136748 Nov 16 16:42 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/usr/local/mysql-3.23.46 --with-low-memory --enable-assembler --enable-assembler --with-innodb - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Default 1 == Default 16777216 ?
You wouldn't happen to be crossing an architecture boundary, would you? Say from a Macintosh client to a PC server, or a PC client to a Sun Server? 16777216 Decimal = 100 Hex which would make perfect sense if there was an 'endism' problem. Philip Molter wrote: I have a 3.23.45 database running with InnoDB tables. When I do this: create table test_default ( testint int not null default 1 ); desc test_default; I get: +-+-+--+-+--+---+ | Field | Type| Null | Key | Default | Extra | +-+-+--+-+--+---+ | testint | int(11) | | | 16777216 | | +-+-+--+-+--+---+ 1 row in set (0.00 sec) Why does my default not go in as '1'. I've tried it with and without quotes. This is vexing. Is there something obvious that I'm just not doing correctly? * Philip Molter * Texas.net Internet * http://www.texas.net/ * [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
I need some help translating a PostgreSQL Query to MySQL
I was wondering if anyone could help me converting some PostgreSQL queries with sub-queries into a similar form usable (hopefully) by both, or at least into a form that I can use in place of the PostgreSQL ones. I'm going to post them - I hope no one minds. If this is the wrong mailing list for these kinds of questions, I apologize. I'm currently using the latest Version 3.23.43, but I can change to Version 4 if these queries are supported there. If it matters, these are for the new version of Freeside, an ISP billing program that (reluctantly) has supported transaction-safe (InnoDB, in my case) tables in MySQL. I think the first one lists all of the customers that have uncancelled packages. Here they are: SELECT * FROM cust_main WHERE 0 ( SELECT COUNT(*) FROM cust_pkg WHERE cust_pkg.custnum = cust_main.custnum AND ( cust_pkg.cancel IS NULL OR cust_pkg.cancel = 0 ) ) OR 0 = ( SELECT COUNT(*) FROM cust_pkg WHERE cust_pkg.custnum = cust_main.custnum ) SELECT * FROM cust_pkg WHERE 0 ( SELECT count(*) FROM pkg_svc WHERE pkg_svc.pkgpart = cust_pkg.pkgpart AND pkg_svc.quantity ( SELECT count(*) FROM cust_svc WHERE cust_svc.pkgnum = cust_pkg.pkgnum AND cust_svc.svcpart = pkg_svc.svcpart ) ) SELECT * FROM svc_acct WHERE 0 ( SELECT count(*) FROM cust_svc WHERE cust_svc.svcnum = svc_acct.svcnum AND pkgnum IS NULL ) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php