Re: Install MySQL-4.0.6 on Red hat Linux 7.3

2002-12-23 Thread Luuk de Boer
Try:

rpm -Uvh mysql-version-etc ...

this will upgrade your mysql instead of installing the new one ..
Else what you can do is:

rpm -e mysql (remove mysql installation)
rpm -ivh mysql (install the new mysql version)

Grtz.

Luuk

On 24 Dec 2002 at 15:29, ECTeo wrote:

> When I try to install MySQL 4.0.6 by
> 
> rpm -i MySQL-VERSION.i386.rpm  --force
> 
>  Linux prompt me 
> 
> MySQL conflict with Mysql-3.23.49-3 
> 
> How to solve the problem?
> 
> 
> 
> 
> 
> 
> 
> -
> 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




Install MySQL-4.0.6 on Red hat Linux 7.3

2002-12-23 Thread ECTeo
When I try to install MySQL 4.0.6 by

rpm -i MySQL-VERSION.i386.rpm  --force

 Linux prompt me 

MySQL conflict with Mysql-3.23.49-3 

How to solve the problem?







-
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




reports

2002-12-23 Thread geeta varu
sir,
i would like to generate reports using mySQL but
unable to get any information related to it
could u please help me out or give some name of the
sites that will get me to get some solution
regards


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




ÓòÃû×¢²á,ÐéÄâÖ÷»ú

2002-12-23 Thread webmaster

Ç×°®µÄÅóÓÑ£º
ÄúºÃ£¡
ÕâÊÇÀ´×ÔÏÃÃÅÍòά¿Æ¼¼·¢Õ¹ÓÐÏÞ¹«Ë¾µÄÎʺ¸ÐлÄúÊÕ¿´Õâ·âÓʼþ¡£ÎÒÃÇÕæ³ÏµÄÏ£
ÍûÄúÄܳÉΪÎÒÃÇÔÚ¹óµØÇøµÄÖØÒª»ï°é¡£ÎÒÃÇÊÇÒ»¼ÒÖÂÁ¦ÓÚ»¥ÁªÍøÐÅÏ¢·þÎñ¡¢µç×ÓÉÌÎñ·þ
ÎñºÍÆóÒµÓ¦Ó÷þÎñµÄ¸ßм¼ÊõÆóÒµ¡£ÎÒÃÇÓÐ×ŶàÄê´ÓʲÙ×÷ϵͳµÄ¾­Ñé,ÕâΪÎÒÃǺͿռä
Îȶ¨ÌṩÁ˱£Ö¤.ÎÒÃǵķþÎñ×ÚÖ¼ÊÇ:Îȶ¨Ñ¹µ¹Ò»ÇÐ!ÏêÇéÇëä¯ÀÀ:http://www.onway.net 
email:[EMAIL PROTECTED] лл£¡
¡¡ÎÒÃÇΪÄúÌṩµÄÒÔÏÂÍøÕ¾¿Õ¼ä¶¼¿ÉÖ§³ÖÊý¾Ý¿â£¨CGI¡¢PHP¡¢MYSQL¡¢SQL¡¢ACCESS¡¢AS
P¡¢JSP£©£¬È«ÃæÂú×ãÄúµÄÐèÇó¡£Õ⽫»áÊÇÄú³¬ÖµµÄÑ¡Ôñ¡£

 1¡¢30M¿Õ¼ä£«30MÆóÒµÓʾ֣«1¸ö¹ú¼ÊÓòÃû£¬¹¦ÄÜÈ«Ã棬½öÊÛ240Ôª/Äꣻ
 2¡¢60M¿Õ¼ä£«60MÆóÒµÓʾ֣«1¸ö¹ú¼ÊÓòÃû£¬¹¦ÄÜÈ«Ã棬½öÊÛ280Ôª/Äꣻ
 3¡¢120M¿Õ¼ä£«120MÆóÒµÓʾ֣«1¸ö¹ú¼ÊÓòÃû£¬¹¦ÄÜÈ«Ã棬½öÊÛ330Ôª/Äꣻ
 4¡¢200M¿Õ¼ä£¨ÃÀ¹ú£©£«50¸öÓÊÏ䣫1¸ö¹ú¼ÊÓòÃû£¬¹¦ÄÜÈ«Ã棬½öÊÛ880Ôª/Äê¡£

 ¡°Îȶ¨Ñ¹µ¹Ò»ÇС±ÊÇÈ«ÌåÍòάÈ˵ķþÎñ×ÚÖ¼£¬ÎÒÃÇÖ£ÖسÐŵ£º
 1¡¢ÍòάÖ÷»úÈ«²¿²ÉÓÃÔ­×°Dell PowerApp»¥ÁªÍøÓ¦Ó÷þÎñÆ÷£»
 2¡¢ÍòάÖ÷»úÈ«²¿°²×°Õý°æTurbolinux»òMicrosoft²Ù×÷ϵͳ£»
 3¡¢²ÉÓÃÊÀ½ç±ê×¼µÄSNMP½øÐÐ24x7x365 ϵͳ¼à²â£»
 4¡¢ÍòάÖ÷»ú¿Í»§Ò»¸öÔÂÄÚ¿ÉÎÞÌõ¼þÈ«¶îÍ˿ÆäËü°´Êµ¼ÊÓà¶îÍË¿î¡£


 ×££º¿ªÐÄ£¡Ë³Àû£¡

 ÏÃÃÅÍòά¿Æ¼¼·¢Õ¹ÓÐÏÞ¹«Ë¾
 µØÖ·£ºÏÃÃÅÊйúó´óÏÃ40²ã
 µç»°:0592-5819328¡¢5815780¡¢5814120
 ´«Õæ:0592-5888462
 



































---
·ÐµãȺ·¢Óʼþ,À´×ÔÈí¼þ¹¤³Ìר¼ÒÍø(http://www.21cmm.com)

½øCMMÍøУ(http://www.21cmm.com)£¬³ÉÏîÄ¿¹ÜÀíר¼Ò

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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




lost field changes

2002-12-23 Thread Larry Brown
Is there any explination as to how this could happen.  I had two fields that
somehow showed up as tinyint when they must have started out as char or
varchar.  I changed them to char and tested it by adding data which worked.
I was able to then pull the characters back out of the database
successfully.  Subsequently I had someone complaining that it isn't holding
data again.  I went back in and it was set back to tinyint.  Does anyone
have any idea what could cause this.  I'm the only one with access to change
the database.  The only other access comes from php which I am the only one
who has access to add php pages. sql

Larry S. Brown
Dimension Networks, Inc.
(727) 723-8388



-
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: DELETE with no WHERE clause

2002-12-23 Thread Dennis Salguero
I can not confirm this, but it would make sense that this was updated in
4.05. After all, you are only deleting your records, not re-building the
table. The new functionality you describe is also present in SQL Server and
Oracle.

Filter: Mysql , sql , query

Good Luck,

Dennis Salguero

- Original Message -
From: "Gordon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 23, 2002 3:21 PM
Subject: DELETE with no WHERE clause


> DID DELETE FROM XXX with no where clause stop acting like truncate in
> 4.0.5?
>
> In 3.23.51 and earlier versions of 4.0.x
>
> mysql> delete from product_order_main;
> GIVES THIS
> Query OK, 0 rows affected (0.10 sec)
>
> AND RESETS THE AUTOINCREMENT VALUE
>
> mysql> insert into product_order_main values
> (null,'rcl1','hh','ab','pending','yes','20021223',now());
> Query OK, 1 row affected (0.10 sec)
>
> mysql> select * from product_order_main;
> +-+-+-+-+-+-+---
> -+-+
> | ordr_ID | cpny_ID | prod_ID | acct_ID | pord_Status | pord_Active |
> pord_Timestamp | pord_Create |
> +-+-+-+-+-+-+---
> -+-+
> |   1 | rcl1| hh  | ab  | Pending | Yes |
> 2002122300 | 2002-12-23 11:14:18 |
> +-+-+-+-+-+-+---
> -+-+
> 1 row in set (0.10 sec)
>
> 
> 
>
> USING 4.0.5 I GET
>
> mysql> delete from product_order_main;
> Query OK, 1 row affected (0.00 sec)
>
> mysql> insert into product_order_main values
> (null,'rcl1','hh','ab','pending','yes','20021223',now());
> Query OK, 1 row affected (0.00 sec)
>
> mysql> select * from product_order_main;
> +-+-+-+-+-+-+---
> -+-+
> | ordr_ID | cpny_ID | prod_ID | acct_ID | pord_Status | pord_Active |
> pord_Timestamp | pord_Create |
> +-+-+-+-+-+-+---
> -+-+
> | 225 | rcl1| hh  | ab  | Pending | Yes |
> 2002122300 | 2002-12-23 11:19:10 |
> +-+-+-+-+-+-+---
> -+-+
> 1 row in set (0.00 sec)
>
>
>
> -
> 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: Password protection

2002-12-23 Thread Kevin Mihelich
Jeremy Zawodny wrote:

On Mon, Dec 23, 2002 at 03:53:14PM -0700, Mark Stringham wrote:


I know the MySQL password( ) function is irreversible. I have also
been told that storing passwords in plain text is a bad idea. Can a
get a few suggestions of good ways to store passwords in the db?



Using MD5() is one of my favorite alternatives.

Jeremy


The way many systems handle passwords, is that you store the password as 
a one-way encryption (MD5 or crypt() for example), then when you need to 
test if that is the right password, you encrypt the password they give 
you, then see if the two encrypted forms match.

That system makes breaking passwords much harder, since you have to 
brute force, not just have the reverse encryption key and then have 
access to all of the passwords.
--
Kevin


-
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: What, if anything, is wrong with UNIX Epoch time stamps?

2002-12-23 Thread Bruce MacDonald
"Michael T. Babcock" <[EMAIL PROTECTED]> wrote,

> But MySQL doesn't guarantee correctness in time values in the first
> place.  You can still insert "2002-02-31" as a date if you like

If you store a date in the database as a unix_timestamp in an unsigned int
column, and retrieve the value using the inverse function, errors of this
kind are self-correcting:

mysql> select unix_timestamp('2002-02-31');
+--+
| unix_timestamp('2002-02-31') |
+--+
|   1015135200 |
+--+
1 row in set (0.51 sec)

mysql> select from_unixtime(1015135200);
+---+
| from_unixtime(1015135200) |
+---+
| 2002-03-03 00:00:00   |
+---+
1 row in set (0.03 sec)


Maybe you don't want this kind of thing happening silently; in such a case
you must validate the date in the API you're using before submitting the
query.

Another benefit of using unix_timestamps: daylight saving time/standard time
issues are handled, because the unix_timestamps always relate to GMT. Date
comparisons thus can take into account time-zone offset.

-- Bruce


-
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: Password protection

2002-12-23 Thread Jeremy Zawodny
On Mon, Dec 23, 2002 at 03:53:14PM -0700, Mark Stringham wrote:
>
> I know the MySQL password( ) function is irreversible. I have also
> been told that storing passwords in plain text is a bad idea. Can a
> get a few suggestions of good ways to store passwords in the db?

Using MD5() is one of my favorite alternatives.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 8 days, processed 319,082,251 queries (422/sec. avg)

-
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




Password protection

2002-12-23 Thread Mark Stringham
I know the MySQL password( ) function is irreversible. I have also been told
that storing passwords in plain text is a bad idea. Can a get a few
suggestions of good ways to store passwords in the db?

Thanks

Mark

sql, query


-
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




problem: mysql locks up under freebsd

2002-12-23 Thread Gojko Vujovic
Hi everyone,

I am having problems with my php+mysql driven site, running on a freebsd 
box. Mysql tends to lock up once-twice a day (or even more) and stop 
responding to queries.

OS is:

# uname -rs
FreeBSD 4.6.2-RELEASE

Database is:
mysql-standard-4.0.6-gamma-unknown-freebsd4.7-i386, binary downloaded 
from mysql.com site. I have tried with both 3.x and 4.x versions, and 
get almost the same results.. I even think that the 3.x locks up more 
frequently, so I continued to use 4.x, even in this beta or whatever state..

PHP Version 4.2.3, Apache/1.3.26

Hardware info:
Intel Pentium III 900mhz, 256MB sdram, 2x40GB hdd raid, mirroring, ultra 
ata 100..

One site running, and it just cannot handle the load sometimes. When 
there are more than 150 visitors online, locks up and doesnt start 
responding even when everything's back to normal.

A few minutes ago a have seen one such lockup myself, the top entry 
shows this:

 9848 mysql  -6   0   151M 26300K biord2:17  0.63%  0.63% mysqld

And both apache and mysql were not responding any more..

I would really appreciate some help / hints on how to solve this issue. 
If you need any more information about the system configuration, please ask!

Show variables output follows..

Thanks,
-Gojko





SQL-query :

SHOW VARIABLES

Variable_name Value

back_log 50
basedir /usr/local/mysql-standard-4.0.6-gamma-unknown-freebsd4.7-i386/
binlog_cache_size 32768
bulk_insert_buffer_size 8388608
character_set latin1
character_sets latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 
ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew 
win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat cp1257 
latin5
concurrent_insert ON
connect_timeout 5
convert_character_set
datadir /usr/local/mysql/data/
delay_key_write ON
delayed_insert_limit 50
delayed_insert_timeout 300
delayed_queue_size 1000
flush OFF
flush_time 0
ft_min_word_len 4
ft_max_word_len 254
ft_max_word_len_for_sort 20
ft_boolean_syntax + -><()~*:""&|
have_bdb NO
have_innodb YES
have_isam YES
have_raid NO
have_symlink NO
have_openssl NO
have_query_cache YES
init_file
innodb_additional_mem_pool_size 1048576
innodb_buffer_pool_size 8388608
innodb_data_file_path ibdata1:10M:autoextend
innodb_data_home_dir
innodb_file_io_threads 4
innodb_force_recovery 0
innodb_thread_concurrency 8
innodb_flush_log_at_trx_commit 0
innodb_fast_shutdown ON
innodb_flush_method
innodb_lock_wait_timeout 50
innodb_log_arch_dir ./
innodb_log_archive OFF
innodb_log_buffer_size 1048576
innodb_log_file_size 5242880
innodb_log_files_in_group 2
innodb_log_group_home_dir ./
innodb_mirrored_log_groups 1
interactive_timeout 28800
join_buffer_size 131072
key_buffer_size 10485760
language 
/usr/local/mysql-standard-4.0.6-gamma-unknown-freebsd4.7-i386/share/mysql/english/
large_files_support ON
local_infile ON
log OFF
log_update OFF
log_bin OFF
log_slave_updates OFF
log_slow_queries ON
log_warnings OFF
long_query_time 5
low_priority_updates OFF
lower_case_table_names OFF
max_allowed_packet 1048576
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connections 1000
max_connect_errors 10
max_delayed_threads 20
max_heap_table_size 16777216
max_join_size 4294967295
max_sort_length 1024
max_user_connections 0
max_tmp_tables 32
max_write_lock_count 4294967295
myisam_max_extra_sort_file_size 268435456
myisam_max_sort_file_size 2147483647
myisam_recover_options OFF
myisam_sort_buffer_size 8388608
net_buffer_length 16384
net_read_timeout 30
net_retry_count 100
net_write_timeout 60
open_files_limit 0
pid_file /usr/local/mysql/data/es.verat.net.pid
port 0
protocol_version 10
read_buffer_size 2093056
read_rnd_buffer_size 262144
rpl_recovery_rank 0
query_cache_limit 1048576
query_cache_size 20971520
query_cache_type ON
server_id 0
slave_net_timeout 3600
skip_external_locking ON
skip_networking ON
skip_show_database OFF
slow_launch_time 2
socket /tmp/mysql.sock
sort_buffer_size 4194296
sql_mode 0
Variable_name Value
table_cache 64
table_type MYISAM
thread_cache_size 0
thread_stack 65536
tx_isolation REPEATABLE-READ
timezone CET
tmp_table_size 33554432
tmpdir /var/tmp/
version 4.0.6-gamma-standard-log
wait_timeout 28800


--
  Gojko Vujovic


-
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: datetime field as key

2002-12-23 Thread Michael She
Hi, you can use a DateTime field, but it is possible to get duplicate 
datetimes if you insert multiple queries fast enough.


At 04:17 PM 12/23/2002 -0200, João Borsoi Soares wrote:
I would like to use a datetime field as a key.  I'm wondering if I will
have any problems with key violation. I found in the document something
saying that timestamp fields are precise, like unix time, but I don't
want it to be changing on update. Does anyone has some experience with
it?


--
Michael She  : [EMAIL PROTECTED]
Mobile   : (519) 589-7309
WWW Homepage : http://www.binaryio.com/



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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Bug, Limitation of MySQL or ?

2002-12-23 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Lenny Sorey wrote:

I'm going to try this one more time. Just trying to keep my question at the top so someone will read it and possibly respond.

Sorry to be a bother, but I've been working on this problem for three days with no succcess.

I store the result(s) of a multiple select listbox in a MySQL version 4.0.2 varchar field 

i.e. 2,3,4,5,6  as a selection example.  -> these results are stored in the table category under the field name category_common.

What I'm trying to do is to use the the the above results in a query such as follows:

The column content.content_common has the values of 2 and 3 and 4 in different rows. I've enclosed category.category_common in parentheses ()
which as I understand should treat category.category_common  as a list.

My question is the following query something that MySQL can render regarding the content.content_common IN (category.category_common) statement or 
am I doing something very wrong?

Once again, when I manually type in (2,3,4) in place of (category.category_common), I get the right answer.

How can I convert (category.category_common) into a list MySQL can understand?

*
Select content_title, content_category, content_order, content_name1
from content, category
where  category.category_id = 'Intbk'  AND content.content_common IN (category.category_common)
Order by content.content_order


According to SQL-99, the predicate for IN must be a row expression (an 
actual list) or be a subquery. A table column name is not allowed.

If you use MySQL-4.1, you can use a subquery for the IN argument:

IN (SELECT )

In any older version of MySQL, you will have to build that list by hand 
with an extra query.

	-Mark
- -- 
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+B3hNtvXNTca6JD8RAlkwAKCi+uN7OPV4ByazPtfJcCmyofsmdQCgq8hR
LaQmJO6nLrmSzuyj7jvh3NA=
=TIpb
-END PGP SIGNATURE-


-
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



NPTL and MySQL

2002-12-23 Thread Mike Wexler
How will NPTL (http://people.redhat.com/drepper/nptl-design.pdf) effect 
MySQL?
Will MySQL break when linked against glibc 2.3.1 which has NPTL built in?
Will MySQL be able to take advantage of NPTL to allow more threads on 
Linux systems.



-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was: R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
Absolutely.  Perl is pretty quick, but it's still not a static compiled
language.

We end up doing a lot of server side calculations with basic math, and then
using MySQL functions to turn it into text, but that isn't always possible.

In our case, we tend to err on the side of the clients doing more work,
since we have a lot of big server clients, and they have a lot more
horsepower than the server does.

As in all things, it's a balance.  It always bothered me that we never used
this nice suite of built-in functions.  That's ok...a lot of other people
use them.  :-)

Cheers.
-Dana

> -Original Message-
> From: Jim Sander [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 12:58 PM
> Cc:   [EMAIL PROTECTED]
> Subject:  Re: What, if anything, is wrong with UNIX Epoch time stamps?
> [Was: R E: TimeStamp in MySQL reqd NULL]
> 
> > Can anyone share and/or comment about the use of Epoch time,
> > especially the hazards?
> 
>Using timestamps you can synch all your times with the server via
> 'now()' and the like. If you use the epoch time on the client side you
> might have problems. What those problems are, I couldn't say- but I have a
> vivid imagination.
> 
>There's also the issue of efficiency. The perl time/date libraries are
> good, but I would suspect mysql is faster. Time:: is a pretty big set of
> tools, so it can bloat your program if you 'use' it.  Regardless, the
> client/server issue comes up again- which box should do more work?
> 
>Both of these seem to be obvious, and not earth-shattering. But I
> figured I'd chime in and see what others had to say. I too have often
> wondered if what I do is "the" right method for the task at hand.
> 
> -=Jim=-
> 
> 
> 
> 
> -
> 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


**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**
 Wal-Mart Stores, Inc. Confidential
**


-
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




DELETE with no WHERE clause

2002-12-23 Thread Gordon
DID DELETE FROM XXX with no where clause stop acting like truncate in
4.0.5?

In 3.23.51 and earlier versions of 4.0.x 

mysql> delete from product_order_main;
GIVES THIS
Query OK, 0 rows affected (0.10 sec)

AND RESETS THE AUTOINCREMENT VALUE

mysql> insert into product_order_main values
(null,'rcl1','hh','ab','pending','yes','20021223',now());
Query OK, 1 row affected (0.10 sec)

mysql> select * from product_order_main;
+-+-+-+-+-+-+---
-+-+
| ordr_ID | cpny_ID | prod_ID | acct_ID | pord_Status | pord_Active |
pord_Timestamp | pord_Create |
+-+-+-+-+-+-+---
-+-+
|   1 | rcl1| hh  | ab  | Pending | Yes |
2002122300 | 2002-12-23 11:14:18 |
+-+-+-+-+-+-+---
-+-+
1 row in set (0.10 sec)




USING 4.0.5 I GET

mysql> delete from product_order_main;
Query OK, 1 row affected (0.00 sec)

mysql> insert into product_order_main values
(null,'rcl1','hh','ab','pending','yes','20021223',now());
Query OK, 1 row affected (0.00 sec)

mysql> select * from product_order_main;
+-+-+-+-+-+-+---
-+-+
| ordr_ID | cpny_ID | prod_ID | acct_ID | pord_Status | pord_Active |
pord_Timestamp | pord_Create |
+-+-+-+-+-+-+---
-+-+
| 225 | rcl1| hh  | ab  | Pending | Yes |
2002122300 | 2002-12-23 11:19:10 |
+-+-+-+-+-+-+---
-+-+
1 row in set (0.00 sec)



-
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: SOLVED! (was: Re: What is wrong with this query?)

2002-12-23 Thread Mark
- Original Message -
From: "Michael T. Babcock" <[EMAIL PROTECTED]>
To: "Mark" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 23, 2002 8:14 PM
Subject: Re: SOLVED! (was: Re: What is wrong with this query?)

> >It seems that the parent exit-ing while the
> >child is doing stuff, makes the child lose its query to MySQL (always
> >more or less at the same point). And this is really strange; for the
parent
> >has nothing to do with MySQL. It is the child who makes the connection
> >and does all queries. So, having the parent linger a bit should have no
> >affect on the child. Yet it does.
> >
> >
>
> I'm not a PERL god, but from C experience, try looking up "wait" and
> "wait" on your child instead of just exiting.


I do not understand what you mean. This is not a parent process that uses a
"waitpid" to reap its died-off children, but a daemon process where the
parent spawns a stand-alone child, fully dissociated from the parent by
closing STDIN, STDOUT, and setting its own session id, where the parent can
exit as soon as $pid is defined. At least, that is how I always understood
the process.

But in light of recent events, maybe not...

- Mark


-
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: [MySQL] What terminates a query?

2002-12-23 Thread Ashley M. Kirchner
Matt Young wrote:

>My sql command pipes its result to a perl program (in batch mode) . but the
>perl program has no waf to tell when the query is finished.
>HTTP uses a blank line to signal the end. but there is no such thing for
>mysql.


Why can't you append an extra line to your sql result (say ##END##) and 
have the perl program check for that string.  Once found, it knows the sql 
command has finished.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.






-
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 
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: What terminates a query?

2002-12-23 Thread Dan Nelson
In the last episode (Dec 23), Matt Young said:
> My sql command pipes its result to a perl program (in batch mode) .
> but the perl program has no waf to tell when the query is finished. 
> HTTP uses a blank line to signal the end. but there is no such thing
> for mysql.

If you are doing something like "mysql -e 'select * from mytable' |
perlprogram", just check for end-of-file.

-- 
Dan Nelson
[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




RE: What terminates a query?

2002-12-23 Thread Fernando Grijalba
What about the semi-colon (;) or (\g)?

JFernando
** sql **

-Original Message-
From: Matt Young [mailto:[EMAIL PROTECTED]]
Sent: December 23, 2002 12:53
To: [EMAIL PROTECTED]
Subject: What terminates a query?


My sql command pipes its result to a perl program (in batch mode) . but the
perl program has no waf to tell when the query is finished.
HTTP uses a blank line to signal the end. but there is no such thing for
mysql.

-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Michael T. Babcock
Csongor Fagyal wrote:


I personally prefer TAI64 time (sub-second precision; see 
http://cr.yp.to/libtai/tai64.html).  For a comparison of how this 
differs from UNIX time, see http://cr.yp.to/proto/utctai.html at the 
same site.  I'm surprised SQL hasn't been updated to support new time 
formats yet, but oh well.


Well, there is BIGINT, isn't there? :-))



TAI64N sub-second precision is 64 bits for the integer and 64 bits for 
the floating-point value ... :)

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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: SOLVED! (was: Re: What is wrong with this query?)

2002-12-23 Thread Michael T. Babcock


I do not understand why. It seems that the parent exit-ing while the child
is doing stuff, makes the child lose its query to MySQL (always more or less
at the same point). And this is really strange; for the parent has nothing
to do with MySQL. It is the child who makes the connection and does all
queries. So, having the parent linger a bit should have no affect on the
child. Yet it does.
 


I'm not a PERL god, but from C experience, try looking up "wait" and 
"wait" on your child instead of just exiting.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd. SQL
http://www.fibrespeed.net/~mbabcock



-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Csongor Fagyal
I personally prefer TAI64 time (sub-second precision; see 
http://cr.yp.to/libtai/tai64.html).  For a comparison of how this 
differs from UNIX time, see http://cr.yp.to/proto/utctai.html at the 
same site.  I'm surprised SQL hasn't been updated to support new time 
formats yet, but oh well.

Well, there is BIGINT, isn't there? :-))

- Cs.



-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Jim Sander
> Can anyone share and/or comment about the use of Epoch time,
> especially the hazards?

   Using timestamps you can synch all your times with the server via
'now()' and the like. If you use the epoch time on the client side you
might have problems. What those problems are, I couldn't say- but I have a
vivid imagination.

   There's also the issue of efficiency. The perl time/date libraries are
good, but I would suspect mysql is faster. Time:: is a pretty big set of
tools, so it can bloat your program if you 'use' it.  Regardless, the
client/server issue comes up again- which box should do more work?

   Both of these seem to be obvious, and not earth-shattering. But I
figured I'd chime in and see what others had to say. I too have often
wondered if what I do is "the" right method for the task at hand.

-=Jim=-




-
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




Bug, Limitation of MySQL or ?

2002-12-23 Thread Lenny Sorey
I'm going to try this one more time. Just trying to keep my question at the top so 
someone will read it and possibly respond.

Sorry to be a bother, but I've been working on this problem for three days with no 
succcess.

I store the result(s) of a multiple select listbox in a MySQL version 4.0.2 varchar 
field 

i.e. 2,3,4,5,6  as a selection example.  -> these results are stored in the table 
category under the field name category_common.

What I'm trying to do is to use the the the above results in a query such as follows:

The column content.content_common has the values of 2 and 3 and 4 in different rows. 
I've enclosed category.category_common in parentheses ()
which as I understand should treat category.category_common  as a list.

My question is the following query something that MySQL can render regarding the 
content.content_common IN (category.category_common) statement or 
am I doing something very wrong?

Once again, when I manually type in (2,3,4) in place of (category.category_common), I 
get the right answer.

How can I convert (category.category_common) into a list MySQL can understand?

*
Select content_title, content_category, content_order, content_name1
from content, category
where  category.category_id = 'Intbk'  AND content.content_common IN 
(category.category_common)
Order by content.content_order


My platform is as follows:

W2k professional, tomcat 4.1.12, J2SDK 1.4.1, MySQL 4.0.2, mysql-connector-java-3.0.0 

Once again, Thanks for any help.

Lenny Sorey



-
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: read-only... even after myisamchk -ru

2002-12-23 Thread Egor Egorov
On Monday 23 December 2002 03:05, Ray Kiddy wrote:

> I had used MySQL's myisampack utility to pack my tables, which makes
> them read-only, but now I want them to be write-able again.
>
> I have used "myisamchk --recover --unpack" (tried -ru as well) and the
> table is still read-only.
>
> What is the actual incantation one must use here? I can backup and
> re-create the table, but that seems unnecessary, if the documentation
> on myisamchk is correct

I hope you did nt ran myisamchk when the server was running... 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




datetime field as key

2002-12-23 Thread João Borsoi Soares
I would like to use a datetime field as a key.  I'm wondering if I will
have any problems with key violation. I found in the document something
saying that timestamp fields are precise, like unix time, but I don't
want it to be changing on update. Does anyone has some experience with
it?

Thanks,
Joao.

mysql


-
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




What terminates a query?

2002-12-23 Thread Matt Young
My sql command pipes its result to a perl program (in batch mode) . but the 
perl program has no waf to tell when the query is finished. 
HTTP uses a blank line to signal the end. but there is no such thing for 
mysql.

-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was: R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread David Brodbeck


> -Original Message-
> From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]

> Csongor Fagyal wrote:
> 
> > Oh and one more thing I am not really sure of: sometimes 
> defining the 
> > day as 3600*24 or the year as 3600*24*365 is not the best 
> idea... just 
> > think about leap years. How do you handle that? And there are some 
> > more "artifacts" in the Gregorian calendar, too...
> 
> 
> But MySQL doesn't guarantee correctness in time values in the first 
> place.  You can still insert "2002-02-31" as a date if you like:

True.  But the example of 3600*24*365 is obviously wrong.  It should at a
minimum be 3600*24*365.25, though that might cause some odd artifacts.  The
best idea would be to put logic in the code to implement the leap year
rules.  (Which are more complicated than you learned in elementary school!
;)

-
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: sql help

2002-12-23 Thread William R. Mussatto
You want to look at 'group by acctSrv.accountID' rather than a compound 
select. 

On Mon, 23 Dec 2002, Adam Nowalsky wrote:

> Date: Mon, 23 Dec 2002 09:04:32 -0500
> From: Adam Nowalsky <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: sql help
> 
> hi, wonder if the sql gurus can help with this one.  i have two tables
> (simplified), tblAccounts and tblAccountsServices.  tblAccounts has an ID
> (PK) and an accountNumber, and tblAccountsServices has an ID (PK) and
> accountID (FK to tblAccounts.ID).  i want to run a query that gives me a row
> for each record in tblAccountsServices that looks like -
> 
> tblAccountsServices.ID, tblAccounts.accountNumber, COUNT of
> tblAccountsServices.ID for this tblAccountsServices.accountID
> 
> i'm thinking something like -
> 
> select acctSrv.ID, a.accountNumber, "select COUNT( ID) from
> tblAccountsServices where accountID = ??" as theCount
> from tblAccountsServices acctSrv, tblAccounts a
> where a.ID = acctSrv.accountID
> 
> it's the part in quotes i'm having trouble with, if it's even possible.  i
> feel like i've seen something similar posted before.  of course, if i have
> to, i can use the brute force method of looping through the rowset of
> tblAccountsServices, and if it's a new accountID from the previous record,
> then run another query to get the count then...
> 
> btw, i'm running mysql 3.23.53-max-nt...
> 
> thanks!
> 
> 
> -
> 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
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


-
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




Problem with 3.23.54a build

2002-12-23 Thread Jeff Hinds
I am attempting to build the latest version of MySQL on a HP-UX 11.00 system
but I have run into on problem over and over again. Once the service is
built, I run the make test command and the process fails at the "rpl01"
step and the test ends with an error code. I go ahead and test the installed
software and I keep receiving the following message when I issued the "show
variables" command:

ERROR 2013: Lost connection to MySQL server during query

In my host.err log file I have the following information:

/usr/local2/jhtest/mysql/libexec/mysqld: ready for connections
mysqld got signal 10;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose
the problem, but since we have already crashed, something is definitely
wrong
and this may fail

key_buffer_size=8384512
record_buffer=126976
sort_buffer=524280
max_used_connections=1
max_connections=300
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 198985 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

021223 11:22:24  mysqld restarted


Has anyone encounteded this and been able to correct the problem and if so,
How?




Thank You

--

Jeff Hinds - Database Specialist
Middle Tennessee State University  Email: [EMAIL PROTECTED]
Information Technology DivisionPhone: (615) 898-5719
Cope Admin. Building - Room 001  Fax: (615) 898-5720
Murfreesboro, Tn 37129


-
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




Table corruption after DELETE FROM ;

2002-12-23 Thread dan
>Description:
 The table is corrupted after DELETE FROM ; command:

 There is one table called tmprecord in my database used as temporary table
 and for serialisation of changes in another table.

 It's used under following schema only:
 
 LOCK tmprecord as tmprecord WRITE, (locking of other table(s) possible)
  insert some data into tmprecord, change some data in tmprecord
 DELETE FROM tmprecord;
 UNLOCK TABLE;

 There are several hundreds "rounds" of operation per day.
 At random intervals the tmprecord become corrupted:

 mysql> select * from tmprecord;
 ERROR 1030: Got error 127 from table handler


 The "repair table tmprecord" repair it with warning 
 "Number of rows changed from 1 to 0"   

 The corruption happen about ten times per year only, at random 
 intervals, with no known dependency to load, running processes and so on.

 size of tmprecord.MYI changes from 4096 to 1024 by repair,  
 size of tmprecord.MYD is zero and doesn't change with repair

 The today's sql command sequence that broke it (the tables tmprecord,
record and change log are locked for write already, the tmprecord table is
empty):

-
SELECT refnum FROM tmprecord LIMIT 1
INSERT INTO changelog VALUES(NULL,1158164, 'CHvs', 'inconsistent', 'zuzana', 
UPDATE record SET obsolete='Y' WHERE refnum=1158164 AND vs=2264048227 AND
INSERT INTO tmprecord SELECT * FROM record WHERE refnum=1158164 AND record.v
UPDATE tmprecord SET splatnost='2002-12-23', EUreply=NULL, EUreplytext=NULL,
INSERT INTO record SELECT * FROM tmprecord
UPDATE changelog SET status='done' WHERE refnum=15078
DELETE FROM tmprecord
UNLOCK TABLES
UNLOCK TABLES
 
  
Note the duplication of "UNLOCK TABLE" - it's bug in my code, but it
shouldn't broke a table.

>How-To-Repeat:

I can't repeat the error, althought it occured several times per
year at random intervals.

 I has copy of broken tmprecord.* table files, so anybody can analyse it.

 The problem is not only on the *.54 revision - i tryed to catch the bug for
more than year and did several upgrades to actually released versions

 If someone has an idea how to catch more information about a problem, let
write to me. Note, it is production environment and only place where i see
the bug (althought I use mysql on several places).

>Fix:
No advice. Sorry.

>Submitter-Id:  
>Originator:Dan Lukes
>Organization:  
>MySQL support: none
>Synopsis:  DELETE FROM ...; broke the ...
>Severity:  serious
>Priority:  medium
>Category:  mysql
>Class: sw-bug
>Release:   mysql-3.23.54 (yes)
>Server: /usr/local/bin/mysqladmin  Ver 8.23 Distrib 3.23.54, for unknown-freebsd4.5 
>on i386

Server version  3.23.54-log
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 1 day 2 hours 31 min 30 sec

Threads: 9  Questions: 9140  Slow queries: 85  Opens: 211  Flush tables: 2  Open 
tables: 48 Queries per second avg: 0.096
>Environment:

System: FreeBSD 4.5-RELEASE FreeBSD i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD]
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-r--r--r--  1 root  wheel  1208074 Jan 28  2002 /usr/lib/libc.a
lrwxrwxrwx  1 root  wheel  9 Jul 18 18:00 /usr/lib/libc.so -> libc.so.4
-r--r--r--  1 root  wheel  573760 Jan 28  2002 /usr/lib/libc.so.4
Configure command: ./configure '--with-charset=czech' '--enable-assembler' 
'--without-bench' '--enable-thread-safe-client' '--with-comment' '--without-docs'
Perl: This is perl, version 5.005_03 built for i386-freebsd

-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was: R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
Interesting.  How's the language support for TAI64?  One of the nicest
things about Epoch time is that any Perl or C (and many other) program
anywhere (on UNIX!) knows how to turn that int into a time-zone aware
human-readable string.

Cheers.
-Dana

> -Original Message-
> From: Michael T. Babcock [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 10:55 AM
> To:   Dana Diederich
> Cc:   'Keith C. Ivey'; [EMAIL PROTECTED]; Akash
> Subject:  Re: What, if anything, is wrong with UNIX Epoch time stamps?
> [Was: R   E: TimeStamp in MySQL reqd NULL]
> 
> Dana Diederich wrote:
> 
> >Can anyone share and/or comment about the use of Epoch time, especially
> the
> >hazards?  I'm asking because I want to make sure that I haven't built a
> >comfortable little box that un-necessarily excludes some useful
> functions.
> >  
> >
> 
> I use Epoch time myself, except where I use TIMESTAMP to record 
> last-updated values automatically (and select it with 
> UNIX_TIMESTAMP(...)" every time.
> 
> I personally prefer TAI64 time (sub-second precision; see 
> http://cr.yp.to/libtai/tai64.html).  For a comparison of how this 
> differs from UNIX time, see http://cr.yp.to/proto/utctai.html at the 
> same site.  I'm surprised SQL hasn't been updated to support new time 
> formats yet, but oh well.
> 
> -- 
> Michael T. Babcock
> C.T.O., FibreSpeed Ltd.
> http://www.fibrespeed.net/~mbabcock
> 


**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**
 Wal-Mart Stores, Inc. Confidential
**


-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was: RE: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
Date/Time is such a tricky thing.  I think that's we migrated toward the
simplest solution in the first place.

For days/weeks/months, I think the math cited below works pretty well.  That
is, if we're not talking about calendar months.  As soon as we need to query
based on calendar things, we tend to get the start and end epoch times from
something like Perl's Time::ParseDate, which is fluent in the madness that
is the Gregorian calendar, and query against such limits.

Cheers.
-Dana

> -Original Message-
> From: Michael T. Babcock [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 10:57 AM
> To:   [EMAIL PROTECTED]
> Cc:   Dana Diederich; 'Keith C. Ivey'; [EMAIL PROTECTED]; Akash
> Subject:  Re: What, if anything, is wrong with UNIX Epoch time stamps?
> [Was: R   E: TimeStamp in MySQL reqd NULL]
> 
> Csongor Fagyal wrote:
> 
> > Oh and one more thing I am not really sure of: sometimes defining the 
> > day as 3600*24 or the year as 3600*24*365 is not the best idea... just 
> > think about leap years. How do you handle that? And there are some 
> > more "artifacts" in the Gregorian calendar, too...
> 
> 
> But MySQL doesn't guarantee correctness in time values in the first 
> place.  You can still insert "2002-02-31" as a date if you like:
> 
> mysql> create table temp (date datetime);   
> Query OK, 0 rows affected
> 
> mysql> insert into temp(date) values ("2002-02-31");
> Query OK, 1 row affected
> 
> mysql> select * from temp;
> +-+
> | date|
> +-+
> | 2002-02-31 00:00:00 |
> +-+
> 1 row in set
> 
> -- 
> Michael T. Babcock
> C.T.O., FibreSpeed Ltd.
> http://www.fibrespeed.net/~mbabcock
> 


**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**
 Wal-Mart Stores, Inc. Confidential
**


-
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




SOLVED! (was: Re: What is wrong with this query?)

2002-12-23 Thread Mark
- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 23, 2002 3:13 PM
Subject: What is wrong with this query?


> For month now I have been plagued by the "Lost connection to MySQ
> server during query" in a Perl program of mine that connects locally to
> /tmp/mysql.sock.


Dear folks,

At long last I found the cause of this nagging problem; it had nothing to do
with MySQL, but with Perl. The cause is so bizarre, that I feel other people
may benefit from my solution. If not, it makes for an interesting story. :)
Ok, her goes.

My own Perl news server, like any other daemon, daemonizes at some point;
like so:

chdir ('/') || exit 1;
open STDIN, '/dev/null';
open STDOUT, '>/dev/null';
if (my $pid = fork ()) {
open (USERLOG, ">".'/var/run/news.pid') || exit 1;
flock (USERLOG, 2);
seek (USERLOG, 0, 0);
print USERLOG " $pid";
close (USERLOG);
system ("/usr/sbin/chown news:news /var/run/news.pid");
exit 0;
}

POSIX::setsid () || exit 1;

Etc.

It is hard to spot, but the culprit was already in this block of code: the
system call to "chown". Literally having taken the program apart, line by
line, I found out, to my astonishment, that when I remove the "chown" line,
that then everything remains stable. If I leave it in, I get the imfamous
"Lost connection to MySQL server during query" within seconds; or, at least,
very regularly.

I solved this by adding a "sleep 5" after the chown command, and before the
"exit 0". For reasons beyond my grasp, having the parent wait an extra 5
seconds, while the child does its start-up stuff, makes all the difference.

I do not understand why. It seems that the parent exit-ing while the child
is doing stuff, makes the child lose its query to MySQL (always more or less
at the same point). And this is really strange; for the parent has nothing
to do with MySQL. It is the child who makes the connection and does all
queries. So, having the parent linger a bit should have no affect on the
child. Yet it does.

It may be that the extra system shell, before the parent exists, interferes
with the child upon exit. But I cannot see how (perhaps STDIN and STDOUT get
rearranged?). Still, adding a "sleep 5" after the parent system call solves
all the problems. Permanently. Just did a loop-test; 100 out of a 100
start-ups went ok. Remove the "sleep 5", and the child goes haywire again.

Perhaps this is trivial to you. In that case, more power to you! But it was
not trivial to me. It took me months to figure this one out.

And so we learn. :)

- Mark


-
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: More info on mysql sporadic crashes

2002-12-23 Thread Victoria Reznichenko
On Saturday 21 December 2002 15:14, Paul P Komkoff Jr wrote:

> I tracked down the bug
>
> I have one table with BLOB field in it
> Then I execute queries like
>
> SELECT * FROM _search WHERE (LOWER(keywords) LIKE LOWER('% blabla %'))
>
> here, keywords is a blob fields
>
> when (LOWER(keywords) LIKE LOWER('% blabla %')) is true, mysql dies
>
> hope this helps

Sorry, but I couldn't repeat it on 4.0.5. It works perfectly well for me:

mysql> select count(*) from mytable where lower(body) like 
lower('%victoria%');
+--+
| count(*) |
+--+
| 1452 |
+--+
1 row in set (9.29 sec)




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: Trouble after installing MySQL

2002-12-23 Thread Victoria Reznichenko
On Monday 23 December 2002 06:15, Andrew Schaefer wrote:

> I am having problems getting mysql working.  I used the rpm packages to
> install the mysql and mysql-max.  It seems like they are running because
> when I use telnet to try to connect to the port 3306 all I get is a message
> saying E Host 'ip' is not allowed to connect to this MySQL
> server.

It's a permissions problem.

> However, when I try to run bin/mysqladmin it gives me errors
> saying that it cannot connect to localhost.  I have installed this through
> ssh to my linux box, could it be that because I am not physically at my
> computer, but using ssh that it is not working?  Please any help would be
> great.

Which exact error did you received?

Check where mysql.sock is located and specify path to the socket file with 
--socket option of mysqladmin.




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: Bug with CASE expression in Update statement

2002-12-23 Thread Victoria Reznichenko
On Monday 23 December 2002 17:54, Robert Berman wrote:
> SELECT Company_ID,
>   COUNT(*)
> FROM Eric
> GROUP BY Company_ID;
> ++--+
> | Company_ID | COUNT(*) |
> ++--+
> |   NULL |   10 |
> ++--+
 1 row in set (0.00 sec)

I got different result that looks like correct for me:
mysql> SELECT Company_ID, COUNT(*) FROM Eric GROUP BY Company_ID;
++--+
| Company_ID | COUNT(*) |
++--+
|   NULL |8 |
| 100100 |2 |
++--+
2 rows in set (0.00 sec)

I tested on v3.23.54




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: TimeStamp in MySQL reqd NULL

2002-12-23 Thread Victoria Reznichenko
On Monday 23 December 2002 12:41, Akash wrote:

> I want to store NULLS or '0' in a column which is of type
> TimeStamp.
> According to MySQL implementation, if I give the default value of the
> column during table creation as NULL, it will store the current time in the
> timestamp column. I do not want this "current time" to be stored in the
> timestamp column. I want it to be NULL. How to do this ?

Use DATETIME column type instead:
http://www.mysql.com/doc/en/DATETIME.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com





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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: replication of mysql on 2 different OS

2002-12-23 Thread Egor Egorov
On Monday 23 December 2002 13:11, Ganesh Rajan wrote:

> iam facing a problem or situation that i have installed mysql 3.23.52 on
> Windows 2000 server..which will be my master... i want to setup my slave
> server which will be on RedHat Linux 7.1 with mysql 3.23.49...
>
> can anyone help me out on this

Replication between Windows and RedHat Linux works fine for me. 
How to set up replication read in the MySQL manual:
http://www.mysql.com/doc/en/Replication_HOWTO.html



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: FULLTEXT Search problems... help!

2002-12-23 Thread Egor Egorov
On Monday 23 December 2002 04:20, luc2 wrote:

> Hello, I have FULLTEXT Indexes on 2 columns, Entry and EntryCountry. ( See
> Below )
>
> mysql> show index from entries\g
> +-++-+--+---+--
>- +-+--++--+
>
> | Table   | Non_unique | Key_name| Seq_in_index | Column_name   |
>
> Collation | Cardinality | Sub_part | Packed | Comment  |
> +-++-+--+---+--
>- +-+--++--+
>
> | entries |  1 | entries_idx |1 | Entry   | A
> |NULL | NULL | NULL   |  |
> | entries |  1 | entries_idx |2 | EntryCountry  | A
> |NULL | NULL | NULL   |  |
> | entries |  1 | Entry   |1 | Entry | A
> |NULL |1 | NULL   | FULLTEXT |
> | entries |  1 | Entry   |2 | EntryCountry  | A
> |NULL | NULL | NULL   | FULLTEXT |
>
> +-++-+--+---+--
>- +-+--++--+
> 8 rows in set (0.02 sec)
>
> ... but when I run a search I get:
>
> mysql> SELECT ID, MATCH ( Entry ) AGAINST ( 'peace corps' ) AS Score FROM
> entries WHERE MATCH ( Entry ) AGAINST ( 'peace corps' ) >0 AND UID !=
> 'demo' HAVING Score >0 ORDER BY Score DESC\g
>
> ERROR 1191: Can't find FULLTEXT index matching the column list

> Why!?!?!?!

Because you have FULLTEXT index on 2 columns - Entry and EntryCountry, but you 
make a search only on one of these column. 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: [Fwd: Need help revising CREATE TABLE]

2002-12-23 Thread Michael T. Babcock
Gloria L. McMillan wrote:


I recently posted this query and it doesn't seem to be getting any responses.
Is there something important that I left unsaid, making this one tough to
answer or is it, perhaps, not addressed to the right list?
 


I'm sure you could find a full app that already does this if you 
searched sourceforge or freshmeat.net.  FWIW, I'd be tempted to 
normalize your table down to:

Survey
SurveyQuestion
Question
UserQuestionResponse
User

You can try to figure out the rest from there ...

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Michael T. Babcock
Csongor Fagyal wrote:


Oh and one more thing I am not really sure of: sometimes defining the 
day as 3600*24 or the year as 3600*24*365 is not the best idea... just 
think about leap years. How do you handle that? And there are some 
more "artifacts" in the Gregorian calendar, too...


But MySQL doesn't guarantee correctness in time values in the first 
place.  You can still insert "2002-02-31" as a date if you like:

mysql> create table temp (date datetime);   
Query OK, 0 rows affected

mysql> insert into temp(date) values ("2002-02-31");
Query OK, 1 row affected

mysql> select * from temp;
+-+
| date|
+-+
| 2002-02-31 00:00:00 |
+-+
1 row in set

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Michael T. Babcock
Dana Diederich wrote:


Can anyone share and/or comment about the use of Epoch time, especially the
hazards?  I'm asking because I want to make sure that I haven't built a
comfortable little box that un-necessarily excludes some useful functions.
 


I use Epoch time myself, except where I use TIMESTAMP to record 
last-updated values automatically (and select it with 
UNIX_TIMESTAMP(...)" every time.

I personally prefer TAI64 time (sub-second precision; see 
http://cr.yp.to/libtai/tai64.html).  For a comparison of how this 
differs from UNIX time, see http://cr.yp.to/proto/utctai.html at the 
same site.  I'm surprised SQL hasn't been updated to support new time 
formats yet, but oh well.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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: Need help connecting to local database with mysql

2002-12-23 Thread Bill Lovett
Hi. I noticed a couple of weird things with your script:

- The error "DBI->connect(myd) failed: Couldn't connect to..." is 
happening I think because 'DBI:mysqlPP:myd' is in single quotes when you 
call DBI->connect, and the syntax seems off. Maybe you'll have better 
success if you follow the syntax shown on this page:

http://search.cpan.org/author/OYAMA/DBD-mysqlPP-0.03/mysqlPP.pm#EXAMPLE

- You have this line:

  my $sth = $dbh->prepare($sql)

Before you've defined the $sql variable. The usual procedure is to 
define your sql first, then prepare it if necessary (which I don't think 
you need to in this case), execute the query, and then loop through the 
results.

- You have

  my @row;
$event=($row[0]);


Before you do an database stuff, so all those variables are just being 
set to empty strings.

Lastly, do you really need to use mysqlPP? My understanding of that 
module is that it's more situations when you can't get regular DBI to 
work. If DBI is an option, you might be better off with that:

http://search.cpan.org/author/TIMB/DBI-1.32/DBI.pm

-bill


Melissa Stranzl wrote:
Hi all:


I am sending a perl program I am trying to run which
doesn't connect to the database. The error message is
at the bottom of the e-mail. I think the program is
going to the sock file and not TCP/IP and I don't know
how to change this, but I'm not sure whether this is
the error, so any help is much appreciated. 
Happy holidays.

MVS.
 


#!/usr/bin/perl -w
package DBD::mysqlPP;
use CGI':standard','-noDebug';

#feo4.pl

my @row;
 $event=($row[0]);
 $location=($row[1]);
 $time=param($row[2]);
 $price=param($row[3]);
 $description=param($row[4]);
 $contact=param($row[5]);
 $day=param($row[6]);

use DBI;


my $dbh= DBI->connect ('DBI:mysqlPP:myd', 'umvs',
'umvs') ||die "Could not connect to database:
".DBI->errstr;

print "hello";
my $sth = $dbh->prepare($sql)
or die "Can't prepare $sql: $dbh->errstr\n";

my $sql="INSERT INTO event VALUES ('$location',
'$time', '$description', '$price', '$day', '$event',
'$contact')";
 $sth->execute();
if (my $sth->SQL($sql)){
print "SQL failed";
exit();
}


#my @row;
while(@row = my $sth->fetchrow_array()) {
   print
qw($row[0]\t$row[1]\t$row[2]\n\t$row[3]\n\t$row[4]\n\t$row[5]\n\t$row[6]\n);
}


 $sth->close();
 $sth->finish();
$dbh->disconnect();


This is the error message I get when I compile the
program:

DBI->connect(myd) failed: Couldn't connect to
/tmp/mysql.sock:  at C:/Perl/site/
lib/DBD/mysqlPP.pm line 109
 at feo4.pl line 19
Could not connect to database: Couldn't connect to
/tmp/mysql.sock:  at C:/Perl/
site/lib/DBD/mysqlPP.pm line 109
(in cleanup) Can't call method "close" on an
undefined value at C:/Perl/
site/lib/DBD/mysqlPP.pm line 274.


-
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




table

2002-12-23 Thread bruno peracchio
Hi
Please, how can I do to make a table from a file.txt or to copy
postgresql's dumpfile?
Thank in advance
bruper




-
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: Load data infile...

2002-12-23 Thread Bill Lovett
Try doubling up your forward slashes so that they stop being special 
characters.

c:\temp  -> c:\\temp

-bill


Lisa He wrote:
Hi,

I have a question with regards to Load data infile...
I have a .txt file containging only path names e.g " C:\temp " in the 
bodytext. this file is imported into the DB using load data infile.

However, when i do a  "select * " on that table which i've just 
imported, the result looks like this:

C:temp\r

so i assume what has happened is that when this file is imported into 
MYSQL, MYSQL treats any forward-slashes as codes. i.e. \t , \n , \r etc

I have tried to put double quotes around the pathnames but it doesn't help.

What should i do so that the path name does not get truncated??

thanks, i'd appreciate the help

regards,
Lisa



_
Fynda på nätet! Handla på MSN Shopping http://www.msn.se/shopping


-
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




mysqlhotcopy should suggest ~/.my.cnf instead of --password

2002-12-23 Thread ch
>Description:
The mysqlhotcopy manpage suggests giving the password via the command
line option '--password'. This is higly insecure as every system user
is able to read it.
>How-To-Repeat:
RTFM ;-)
>Fix:
Please apply the following patch:

--- mysql-dfsg-3.23.54a/scripts/mysqlhotcopy.sh.orig2002-12-23 17:06:18.0 
+0100
+++ mysql-dfsg-3.23.54a/scripts/mysqlhotcopy.sh 2002-12-23 17:18:06.0 +0100
@@ -49,7 +49,8 @@
 
   -?, --help   display this helpscreen and exit
   -u, --user=# user for database login if not current user
-  -p, --password=# password to use when connecting to server
+  -p, --password=# password to use when connecting to server if not set
+   in e.g. ~/.my.cnf
   -h, --host=#Hostname for local server when connecting over TCP/IP
   -P, --port=# port to use when connecting to local server with TCP/IP
   -S, --socket=#   socket to use when connecting to local server
@@ -893,7 +894,11 @@
 
 =item -p, --password=# 
 
-password to use when connecting to server
+password to use when connecting to server. Note that you are strongly encouraged 
+*not* to use this option as every user would be able to see the password in the
+process list. Instead use the '[mysqlhotcopy]' section in one of the config
+files, normally /etc/mysql/my.cnf or your personal ~/.my.cnf.
+(See manual '4.1.2 my.cnf Option Files')
 
 =item -h, -h, --host=#
 

>Submitter-Id:  
>Originator:Christian Hammers
>Organization:
 The Debian Project
>MySQL support: none
>Synopsis:  mysqlhotcopy manpage suggests --password instead of ~/.my.cnf
>Severity:  non-critical
>Priority:  low
>Category:  mysql
>Class: doc-bug
>Release:   mysql-4.0.6-gamma (Source distribution)
>Environment:

System: Linux app109 2.4.20-app109-1 #4 Thu Dec 5 21:44:44 CET 2002 i686 unknown 
unknown GNU/Linux
Architecture: i686
Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''  ASFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 2002-11-20 02:56 /lib/libc.so.6 -> 
libc-2.3.1.so
-rwxr-xr-x1 root root  1109068 2002-11-19 19:13 /lib/libc-2.3.1.so
-rw-r--r--1 root root  2344038 2002-11-19 19:14 /usr/lib/libc.a
-rw-r--r--1 root root  178 2002-11-19 19:14 /usr/lib/libc.so
-rw-r--r--1 root root   716080 2002-01-13 21:06 
/usr/lib/libc-client.so.2001
Configure command: ./configure '--prefix=/usr' '--exec-prefix=/usr' 
'--libexecdir=/usr/sbin' '--datadir=/usr/share' '--sysconfdir=/etc/mysql' 
'--localstatedir=/var/lib/mysql' '--includedir=/usr/include' 
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--enable-shared' 
'--enable-static' '--enable-thread-safe-client' '--enable-assembler' 
'--enable-local-infile' '--with-raid' 
'--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' 
'--with-libwrap' '--with-client-ldflags=-lstdc++' '--with-embedded-server' 
'--with-vio' '--with-openssl' '--without-docs' '--without-bench' '--without-readline' 
'--with-extra-charsets=all' '--with-berkeley-db' '--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




Re: What, if anything, is wrong with UNIX Epoch time stamps? [Was:R E: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Csongor Fagyal
Dana Diederich wrote:


This is a related but different question/comment.

In the six or so years of using MySQL, my various teams have never used
anything except an unsigned INT and UNIX Epoch time to record timestamps.
The given is, of course, we have always been a Perl/C/C++/UNIX shop, and we
will be for a long time, at least.  :-)  I have looked at the growing list
of MySQL date/time functions from time to time, and have always come to the
conclusion that Epoch time is the best way for us to store date/time.

Another given is that we don't need to save sub-second time stamps.

I won't go into the pros of Epoch time.  I'll just say that we've never
found it wanting.  I guess the cost is having queries like  "where ts <
(other_ts - (3600 * 24 * 7))", etc.  Perl, our primary language,  makes at
an absolute breeze to convert to/from Epoch time.

Can anyone share and/or comment about the use of Epoch time, especially the
hazards?  I'm asking because I want to make sure that I haven't built a
comfortable little box that un-necessarily excludes some useful functions.
:-)


Dana,

I think you are pretty much right about storing epoch timestamps. They 
come in handy especially when you need to do many queries with 
time-based where clauses: indexes help you a lot and IMHO are very fast 
on integer columns, while they tend to be inefficient on datetime 
(&friends) columns [just think about ...WHERE TO_DAYS(when)-6 < 
TO_DAYS(NOW()) ]. If you use a scripting environment (say Perl), where 
you use your own programming logic rather than that of the database, I 
can't think of any drawbacks of using the epoch. Well, maybe one thing: 
if you "manually" browser your database, a ten character integer is not 
very talkative, while a datetime is. So, it depends: I would say that 
only use datetime in rarely used small tables, or where timestamps are 
only secondary data, or where you do not want to bother with 
epoch<->date conversions.

Oh and one more thing I am not really sure of: sometimes defining the 
day as 3600*24 or the year as 3600*24*365 is not the best idea... just 
think about leap years. How do you handle that? And there are some more 
"artifacts" in the Gregorian calendar, too...

- Cs.



-
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



Bug with CASE expression in Update statement

2002-12-23 Thread Robert Berman
SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `<' and `>').
SEND-PR:
From: root
To: [EMAIL PROTECTED]
Subject:Bug with CASE expression in Update statement

>Description:
CASE WHEN expression used in UPDATE statement gives wrong result.
>How-To-Repeat:
DROP TABLE IF EXISTS Eric;
 
CREATE TABLE Eric (ID INTEGER NOT NULL PRIMARY KEY,
   Company_ID INTEGER NULL);
 
INSERT INTO Eric VALUES ( 1,  -1);
INSERT INTO Eric VALUES ( 2,  -1);
INSERT INTO Eric VALUES ( 3,   1);
INSERT INTO Eric VALUES ( 4,   1);
INSERT INTO Eric VALUES ( 5,  10);
INSERT INTO Eric VALUES ( 6,  10);
INSERT INTO Eric VALUES ( 7, 100);
INSERT INTO Eric VALUES ( 8, 100);
INSERT INTO Eric VALUES ( 9,  10);
INSERT INTO Eric VALUES (10,  10);
 
SELECT Company_ID,
   COUNT(*)
  FROM Eric
 GROUP BY Company_ID;
 
++--+
| Company_ID | COUNT(*) |
++--+
| -1 |2 |
|  1 |2 |
| 10 |4 |
|100 |2 |
++--+
4 rows in set (0.00 sec)
 
mysql> UPDATE Eric SET Company_ID =
CASE WHEN Company_ID <= 0 OR Company_ID >= 5
THEN NULL
ELSE Company_ID + 10
END;
 
Query OK, 10 rows affected (0.01 sec)
Rows matched: 10  Changed: 10  Warnings: 0
 
mysql> SELECT Company_ID,
  COUNT(*)
FROM Eric
GROUP BY Company_ID;
 
++--+
| Company_ID | COUNT(*) |
++--+
|   NULL |   10 |
++--+
1 row in set (0.00 sec)

>Fix:
UPDATE Eric
SET Company_ID = IF(Company_ID <= 0 OR Company_ID >= 5, 
NULL, Company_ID + 10);

>Submitter-Id:  
>Originator:Robert Berman
>Organization:
 Peregrine Systems, Inc.
 Ottawa, ON, Canada K2C 3V4
 Tel: (613) 274-6813, FAX: (513) 723-7209
>MySQL support: [none | licence | email support | extended email support ]
email support
>Synopsis:  Bug with CASE expression in Update statement
>Severity:  non-critical
>Priority:  medium
>Category:  mysql
>Class: sw-bug
>Release:   mysql-3.23.52 (Source distribution)
>Server: /usr/mysql/bin/mysqladmin  Ver 8.23 Distrib 3.23.52, for 
pc-linux-gnu on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.52
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 3 days 2 hours 17 min 6 sec

Threads: 6  Questions: 4801651  Slow queries: 3  Opens: 134778  Flush tables: 
129  Open tables: 128 Queries per second avg: 17.955
>Environment:

System: Linux 172-22-5-24.localdomain 2.4.20 #1 Fri Nov 29 09:37:13 EST 2002 
i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl

Compilation info: CC='gcc'  CFLAGS='-mcpu=pentiumpro'  CXX='g++'  
CXXFLAGS='-mcpu=pentiumpro -fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Dec  6 11:21 /lib/libc.so.6 -> 
libc-2.2.3.so
-rwxr-xr-x1 root root  1193256 Sep 26  2001 /lib/libc-2.2.3.so
-rw-r--r--1 root root 24976516 Aug 31  2001 /usr/lib/libc.a
-rw-r--r--1 root root  190 Aug 31  2001 /usr/lib/libc.so
Configure command: ./configure --enable-assembler CFLAGS=-mcpu=pentiumpro 
'CXXFLAGS=-mcpu=pentiumpro -fno-exceptions -fno-rtti' CXX=g++


-
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: MyODBC with text files

2002-12-23 Thread Fernando Grijalba
I think you need the ODBC driver for plain text files to do so.  It is
generally installed in Win32, but I do not know about Linux.  As to use
MyODBC for that, I do not think it will work.

HTH

JFernando
** sql **

-Original Message-
From: Nikola Pentchev (ESA) [mailto:[EMAIL PROTECTED]]
Sent: December 20, 2002 02:11
To: '[EMAIL PROTECTED]'
Subject: MyODBC with text files


Hello,

I am writing this e-mail just to ask about the following:
I plan to implement some data storage in flat ASCII files. I want to work
with SQL in order to automate requests from/to the files. Can I use MyODBC
in order to work against flat files? If yes, what do I need to install (can
I just install MyODBC and use the C API)? I am working on Solaris 8

Thanks

Nikola Pentchev
Lead Designer
Ericsson South Africa (Pty) Ltd
Tel: +27 11 844 2254
Fax: +27 11 844 2279
Mobile: +27 83 222 6063
ECN: 820 2254




-
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




What, if anything, is wrong with UNIX Epoch time stamps? [Was: RE: TimeStamp in MySQL reqd NULL]

2002-12-23 Thread Dana Diederich
This is a related but different question/comment.

In the six or so years of using MySQL, my various teams have never used
anything except an unsigned INT and UNIX Epoch time to record timestamps.
The given is, of course, we have always been a Perl/C/C++/UNIX shop, and we
will be for a long time, at least.  :-)  I have looked at the growing list
of MySQL date/time functions from time to time, and have always come to the
conclusion that Epoch time is the best way for us to store date/time.

Another given is that we don't need to save sub-second time stamps.

I won't go into the pros of Epoch time.  I'll just say that we've never
found it wanting.  I guess the cost is having queries like  "where ts <
(other_ts - (3600 * 24 * 7))", etc.  Perl, our primary language,  makes at
an absolute breeze to convert to/from Epoch time.

Can anyone share and/or comment about the use of Epoch time, especially the
hazards?  I'm asking because I want to make sure that I haven't built a
comfortable little box that un-necessarily excludes some useful functions.
:-)

Cheers.
-Dana
> -Original Message-
> From: Keith C. Ivey [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 9:16 AM
> To:   [EMAIL PROTECTED]
> Cc:   Akash
> Subject:  Re: TimeStamp in MySQL reqd NULL
> 
> On 23 Dec 2002, at 16:11, Akash wrote:
> 
> > According to MySQL implementation, if I give the default value of the
> column
> > during table creation as NULL, it will store the current time in the
> > timestamp column. I do not want this "current time" to be stored in the
> > timestamp column. I want it to be NULL. How to do this ?
> 
> If you don't like the properties of TIMESTAMP columns, don't use them.
> Use DATETIME instead, or use an INT and store Unix time in it (thus
> avoiding some complications of time zones and daylight saving time).
> 
> -- 
> Keith C. Ivey <[EMAIL PROTECTED]>
> Tobacco Documents Online
> http://tobaccodocuments.org
> Phone 202-667-6653
> 
> -
> 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


**
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to 
whom they are addressed.  If you have received this email
in error destroy it immediately.
**
 Wal-Mart Stores, Inc. Confidential
**


-
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




Load data infile...

2002-12-23 Thread Lisa He
Hi,

I have a question with regards to Load data infile...
I have a .txt file containging only path names e.g " C:\temp " in the 
bodytext. this file is imported into the DB using load data infile.

However, when i do a  "select * " on that table which i've just imported, 
the result looks like this:

C:temp\r

so i assume what has happened is that when this file is imported into MYSQL, 
MYSQL treats any forward-slashes as codes. i.e. \t , \n , \r etc

I have tried to put double quotes around the pathnames but it doesn't help.

What should i do so that the path name does not get truncated??

thanks, i'd appreciate the help

regards,
Lisa



_
Fynda på nätet! Handla på MSN Shopping http://www.msn.se/shopping


-
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



[Fwd: Need help revising CREATE TABLE]

2002-12-23 Thread Gloria L. McMillan
Hi, all,

I recently posted this query and it doesn't seem to be getting any responses.
Is there something important that I left unsaid, making this one tough to
answer or is it, perhaps, not addressed to the right list?

I would like to redo my CREATE TABLE very much to allow me to do
more efficient queries.  Now it is pretty coumbersome but a guru told me
that with a change in CREATE TABLE I could do more efficient queries
of the sort I describe below.

So please let me know if there is someplace else that I should be writing.

Thanks,

Gloria McMillan


"Gloria L. McMillan" wrote:

> Greetings and happy holidays!
>
> This is a query about how to better structure an existing mysql table.
>
> I want to make a rather complex SELECT off an opinion poll.
>
> Thus:
>
> SELECT Those who answered Q3 as "1"
> SELECT these people's answers for Q4, Q5, Q6…
>
> (Any size array of the rest of the questions.  This is to compare how
> different demographic groups answer the other questions.)
>
> The CREATE TABLE as that works in MySQL but is cumbersome for the
> query above:
>
> CREATE TABLE ADJ04survey (
> id int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
>added datetime DEFAULT '-00-00 00:00:00' NOT NULL,
>
> The CREATE TABLE in SQL that won't compile at MyCC but can handle
> a moe complex style of SELECT query:
>
> CREATE TABLE ADJsurvey (
>  id int identity(1,1),
> added datetime DEFAULT getdate() NOT NULL,
>
> The person who helped me doesn't know MySQL, only SQL and says
> that his syntax may be off.
>
> Can somebody help?
>
> Thank you,
>
> Gloria Mcmillan
> [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




Re: TimeStamp in MySQL reqd NULL

2002-12-23 Thread Keith C. Ivey
On 23 Dec 2002, at 16:11, Akash wrote:

> According to MySQL implementation, if I give the default value of the column
> during table creation as NULL, it will store the current time in the
> timestamp column. I do not want this "current time" to be stored in the
> timestamp column. I want it to be NULL. How to do this ?

If you don't like the properties of TIMESTAMP columns, don't use them.
Use DATETIME instead, or use an INT and store Unix time in it (thus
avoiding some complications of time zones and daylight saving time).

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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




What is wrong with this query?

2002-12-23 Thread Mark
For month now I have been plagued by the "Lost connection to MySQL server
during query" in a Perl program of mine that connects locally to
/tmp/mysql.sock.

Having taken everything apart, I have narrowed it down to this line:

$sth = $dbh -> prepare ("SELECT concat(newsgroup, ' ', stop, ' ', start, '
', flags) FROM newsgroups WHERE local <> 'y' ORDER BY newsgroup ASC");

Whenever it fails, around 3 out of 10 times, it fails in this query. This
query only returns a small amount of data, around 20 newsgroups or so. I see
nothing wrong with this query, and most of the times it executes just fine.

Could someone please tell me what I am doing wrong here? Why, when it fails,
would it fail here??

Thanks!

- Mark


-
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




sql help

2002-12-23 Thread Adam Nowalsky
hi, wonder if the sql gurus can help with this one.  i have two tables
(simplified), tblAccounts and tblAccountsServices.  tblAccounts has an ID
(PK) and an accountNumber, and tblAccountsServices has an ID (PK) and
accountID (FK to tblAccounts.ID).  i want to run a query that gives me a row
for each record in tblAccountsServices that looks like -

tblAccountsServices.ID, tblAccounts.accountNumber, COUNT of
tblAccountsServices.ID for this tblAccountsServices.accountID

i'm thinking something like -

select acctSrv.ID, a.accountNumber, "select COUNT( ID) from
tblAccountsServices where accountID = ??" as theCount
from tblAccountsServices acctSrv, tblAccounts a
where a.ID = acctSrv.accountID

it's the part in quotes i'm having trouble with, if it's even possible.  i
feel like i've seen something similar posted before.  of course, if i have
to, i can use the brute force method of looping through the rowset of
tblAccountsServices, and if it's a new accountID from the previous record,
then run another query to get the count then...

btw, i'm running mysql 3.23.53-max-nt...

thanks!


-
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: How long is my piece of string?

2002-12-23 Thread David Brodbeck


> -Original Message-
> From: Mike Wexler [mailto:[EMAIL PROTECTED]]

> The best answer is, "try it and see." If your tables are 
> small. Adding 
> and removing indices is very quick. And testing queries is 
> also very quick.

Enabling the slow query log, and enabling log-long-format can give some
hints by logging all queries that don't use indexes.  Then you can feed
those queries to the EXPLAIN command and figure out why.  I dramatically
sped up several queries on my database this way.

-
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: [Error] Mysql server has gone away

2002-12-23 Thread David BORDAS
hi,

I always have my problem and i didn't find any solution pour the moment.
Please, if somone have an idea ... :(

Thanks
David

Subject: [Error] Mysql server has gone away && 3.23.53a
Date: Thu, 19 Dec 2002 17:23:31 +0100

I've some problem with my Mysql servers since the beginning of this week.

I've got plenty of error like this :
Failed to connect to database: Error: Access denied for user:
´[EMAIL PROTECTED]´ to database ´DB1´
MySQL server has gone away
Error Nø1, please contact webmaster ...

In fact, clients are C cgi compiled with libmysql ( in this package
MySQL-devel-3.23.49-1.i386.rpm )
The Cgi is ok and have worked well since several mounths.

Error Nø1 : connection mysql ok, can't execute my query

It seems that mysql disconnect me before i can execute my query.
But query is just after the connection in the code ... :(

Mysql server is always up and didn't gone away any more ...

Server : Linux Redhat
2 * PIII 1 Ghz
1Go ram
Scsi raid 5
mysql-3.23.53a-pc-linux-gnu-i686.tar.gz ( binary )

As you can see, i connect to my server via a 100Mb LAN.
The LAN is ok, all ethernet card are 100Mb Full Duplex without any collision
or packet dropped.
Exemple :

RX packets:259950587 errors:0 dropped:0 overruns:0 frame:0
TX packets:1809122347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:100
RX bytes:3130833186 (2985.7 Mb)  TX bytes:1637489037 (1561.6 Mb)

Here's the my.cnf :
# The MySQL server
[mysqld]
port= 3306
socket = /tmp/mysql.sock
skip-locking
skip-name-resolve
set-variable= key_buffer=256M
set-variable= back_log=150
set-variable= record_buffer=1M
set-variable= sort_buffer=1M
set-variable= max_allowed_packet=1M
set-variable= thread_stack=128K
set-variable= max_connections=700
set-variable= max_connect_errors=100
set-variable= table_cache=512
set-variable= net_read_timeout=180
set-variable= net_write_timeout=180
set-variable= wait_timeout=3600
set-variable= thread_concurrency=4

I can't see anything in the error log.

Mysqld is still alive and still responding 99% of the time.

Status : Threads: 3  Questions: 3065350  Slow queries: 46  Opens: 91  Flush
tables: 1  Open tables: 66 Queries per second avg: 9.052

Show Status :
Aborted_clients   4401
Aborted_connects374
Bytes_received332129641
Bytes_sent  1691254415
[...]
Created_tmp_disk_tables   0
Created_tmp_tables211
Created_tmp_files 1290
Handler_delete   | 11135  |
Handler_read_first   | 226|
Handler_read_key | 2005755|
Handler_read_next| 1714626349 |
Handler_read_prev| 0  |
Handler_read_rnd | 2613047|
Handler_read_rnd_next| 62634691   |
Handler_update   | 357300 |
Handler_write| 304440 |
Key_blocks_used  | 62869  |
Key_read_requests| 97082717   |
Key_reads| 60114  |
Key_write_requests   | 487582 |
Key_writes   | 392106 |
Max_used_connections | 23 |
Not_flushed_key_blocks   | 0  |
Not_flushed_delayed_rows | 0  |
Open_tables  | 66 |
Open_files   | 102|
Open_streams | 0  |
Opened_tables| 91
Questions| 3065612|
Select_full_join | 0  |
Select_full_range_join   | 0  |
Select_range | 600|
Select_range_check   | 0  |
Select_scan  | 51701  |
Slave_running| OFF|
Slave_open_temp_tables   | 0  |
Slow_launch_threads  | 0  |
Slow_queries | 46 |
Sort_merge_passes| 645|
Sort_range   | 99887  |
Sort_rows| 2613047|
Sort_scan| 20030  |
Table_locks_immediate| 1841001|
Table_locks_waited   | 1977   |
Threads_cached   | 0  |
Threads_created  | 1226346|
Threads_connected| 2  |
Threads_running  | 1  |
Uptime   | 338664

Extract of the mysql.db table :
192.168.10.4 | DB1 | JForvC15 | Y ( select priv ... )


-
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




RPM bug?

2002-12-23 Thread Csongor Fagyal
Hi,

I was trying to upgrade my 3.23.52 MySQL to 5.23.54a using rpm -U. The 
system just hangs. (I am running RedHat 8.0)

This is what I get running a strace on rpm -U MySQL-whatever:
[...]
stat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/lib/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/lib/rpm", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
access("/var/lib/rpm", W_OK)= 0
access("/var/lib/rpm/__db.001", F_OK)   = 0
access("/var/lib/rpm/Packages", F_OK)   = 0
brk(0x8277000)  = 0x8277000
open("/var/lib/rpm/DB_CONFIG", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
open("/var/lib/rpm/__db.001", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=8192, ...}) = 0
close(3)= 0
open("/var/lib/rpm/__db.001", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x4020
close(3)= 0
open("/var/lib/rpm/__db.002", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 1310720, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x40202000
close(3)= 0
open("/var/lib/rpm/__db.003", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
mmap2(NULL, 360448, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x40342000
close(3)= 0
open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=14827520, ...}) = 0
_llseek(3, 0, [0], SEEK_SET)= 0
read(3, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 
256) = 256
close(3)= 0
open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=14827520, ...}) = 0
brk(0x8278000)  = 0x8278000
select(0, NULL, NULL, NULL, {0, 1000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 2000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 4000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 8000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 16000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 32000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 64000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 128000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 256000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 512000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)

the last line repeated forewer.

Any ideas?

- Csongor


-
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



MySQL 4.0.6 is not working with MyODBC 3.51.05

2002-12-23 Thread Andrew Kuebler
I've upgraded to 4.0.6 and now MyODBC does not function properly when it
used to work fine with 4.0.1. When I try to open a linked table in
Access I get the error:

ODBC--Call Failed
[MySQL][ODBC 3.51 Driver][mysqld-4.0.6*gamma-nt]Access denied for user:
'@(My IP)' to database '(Database name here) (#1044)

In order to view data through my ODBC & Access, I must delete all linked
tables & "Compact & Repair Database". Then close Access & re-open the
Access database and re-link the tables. Now everything is fine. BUT, if
I happen to close Access, I have to repeat the whole process above
because I can now no longer view data through Access and MyODBC. This
never happened with 4.0.1 Alpha.

Is there something new in this version that would cause this problem? I
did try reinstalling MyODBC just for laughs and everything continues to
act the same.

Andrew



-
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




replication of mysql on 2 different OS

2002-12-23 Thread Ganesh Rajan
hi gurus,

iam facing a problem or situation that i have installed mysql 3.23.52 on
Windows 2000 server..which will be my master... i want to setup my slave
server which will be on RedHat Linux 7.1 with mysql 3.23.49...

can anyone help me out on this

Thanks in advance
Ganesh Rajan


-
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




TimeStamp in MySQL reqd NULL

2002-12-23 Thread Akash
Hi,
I want to store NULLS or '0' in a column which is of type
TimeStamp.
According to MySQL implementation, if I give the default value of the column
during table creation as NULL, it will store the current time in the
timestamp column. I do not want this "current time" to be stored in the
timestamp column. I want it to be NULL. How to do this ?
thanks
Akash








-
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: Docs make wrong statement about Debians init scripts

2002-12-23 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Sun, 22 Dec 2002 [EMAIL PROTECTED] wrote:

> >Description:
>   http://www.mysql.com/doc/en/Linux-x86.html
>   says what to do to start MySQL on system boot in "Debian GNU/Linux".
>   I don't know if this holds true for some of your binary packages
>   under Debian, but the official Debian package is configure by
>   debconf. So this text is misleading for Debian users and should
>   be removed completely.

Thanks for the hint - now fixed in the current manual.texi (not updated on
the web pages yet).

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   <___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+BuVGSVDhKrJykfIRAtsvAJ9fTnwp5nyzEY5zU1iNOVy0duLPlgCeOkrY
sclnqcFRNCkMDqrefmbul88=
=3UXK
-END PGP SIGNATURE-


-
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




RPM updating

2002-12-23 Thread Csongor Fagyal
Hi,

I have a 3.23.52-3 MySQL RPM installed (I think it is a RedHat version) 
and I would like to upgrade to 5.23.54a. What is the easiest way to do 
this? Download the new RPM-s and make an update/freshen? Or should I 
better remove the RPM and do a source install? What about my config 
files, will they remain unhurt?

THX,
- Csongor


-
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: Innodb querry optimizer suddenly making TERRIBLE choices? Urgent, Please help!

2002-12-23 Thread Heikki Tuuri
Joe,

- Original Message -
From: ""Joe Smith"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Monday, December 23, 2002 6:41 AM
Subject: Innodb querry optimizer suddenly making TERRIBLE choices? Urgent,
Please help!


> I'm in a bit of a tough spot --   My innodb table of WebActionLogs (which
> has 1 million rows spread out over the last year and a half) has suddenly
> stopped using 'TimeInitiated' to select only the last 24 hours of data
> (usually less than 7,500 rows), and now wants to copy all 1 million rows
to
> a temporary table no matter what I do!I tried adding a 'USE INDEX
> (TimeInitiated_ind)',  it STILL does the longest possible query by copying
> everything to a temporary table first.
>
> Suddenly hundreds of queries that were working fine yesterday and ran
under
> 0.1 seconds are taking 40 to 50 seconds and ending up in the slow query
log.
> This has been working fine for months.
>
> Is there a way to FORCE innodb to use the index whethere it thinks it's
> faster or not?  I know it will be 400x faster if it does but USE INDEX
> apparently has no effect.


unfortunately USE INDEX has a a bit misleading name. It only bans MySQL from
using any OTHER index than the ones listed in the argument, but it does not
ban MySQL from using a table scan.

We have talked that Monty should introduce a new clause FORCE
INDEX(indexname) which would ban table scans.

...

> +-+
> | VERSION()   |
> +-+
> | 3.23.51-log |
> +-+
>
> Thanks in advance for any clues!

Please upgrade to 3.23.54b
http://www.mysql.com/downloads/mysql-max-3.23.html. I have tuned the
optimizer to favor index searches over table scans.

> Joe

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com

sql query




-
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: Delimited Characters (\)

2002-12-23 Thread Michael She
Thanks for the link!


I was having some trouble figuring what keywords to search under ; )



At 11:43 PM 12/22/2002 -0800, Jeremy Zawodny you wrote:

On Mon, Dec 23, 2002 at 02:41:03AM -0500, Michael She wrote:
> Hi,
>
> Is the \ character a delimited in MySQL?  I noticed in text inserts I have
> to double slash even if it is enclosed in single quotes.  I find this
> behaviour a bit odd.
>
> Are there other delimited characters I should be aware of?

The manual has all the answers:

  http://www.mysql.com/doc/en/String_syntax.html

:-)
--
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 8 days, processed 298,338,567 queries (425/sec. avg)

-
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

--
Michael She  : [EMAIL PROTECTED]
Mobile   : (519) 589-7309
WWW Homepage : http://www.binaryio.com/



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

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php