Re: WHERE clouse
All the test I've made shows that the first query is faster . I can't believe my eyes. Andrea - 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
Error 1104 (too many records)
Hi, I recently upgraded from 4.0.4 to 4.0.7 . I keep getting the following error message when a executing a query: ERROR 1104 at line xx : The SELECT would examine too many records and probably take a long time. Check your WHERE and use SET OPTION SQL_BIG_SELECTS=1 if the SELECT is ok. The problem is that this query used to work perfectly with previous versions of Mysql and that using SET OPTINION SQL_BIG_SELECTS=1 doesn't help : Does anyone have a clue ? Best Regards Andrea Forghieri Emmegi S.p.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 <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Need help installing PHP (Linux) with MySQL and Apache
I have been successful (after days of trying) with Apache 2.0.43 , PHP 4.2.3 on Redhat 7.3 I compiled php with ./configure --with-mysql --with-apxs2=/apth/to/apxs (apxs is under /path/to/apache2/bin) After 'make' and 'make install' you will find libphp4.so in /path/to/apache2/modules Then I added the following lines in httpd.conf LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php php SetOutputFilter PHP Have fun Andrea Forghieri - 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
help displaying results from a mysql query with php
Instead of echo htmlspecialchars( stripslashes($row["$i"])); use echo htmlspecialchars( stripslashes($row[0])); In fact , if you increase $i you increase the column thus , in the first cycle you see col 0 , in the second col 1 for more information visit http://www.php.net/manual/en/function.mysql-fetch-row.php Have fun Andera Forghieri - 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 4.0.4 + InnoDB leads to corrupted tables ?
Thank you very much Heikki. Your suggestions are useful. I also noticed that the use on symlinks are somehow deprecated with the last releases of Mysql. Concerning the problem : I lately discovered that the Air Conditioning of the servers room was OFF, thus there where some 40° (we could have grown orchards in there ;-) ). After restoring the AC, MySql and InnoDb are back to businness !! As far as I am concerned everithing is running fast and safe an smooth. Bye Andrea Forghieri Andrea, - Original Message - From: ""Andrea Forghieri"" <[EMAIL PROTECTED]> Newsgroups: mailing.database.mysql Sent: Saturday, October 12, 2002 2:02 AM Subject: Mysql 4.0.4 + InnoDB leads to corrupted tables ? > Hi, > > I recently updated from 4.0.3 do 4.0.4 . > everithing was running fast ans smooth (as always). > > Then I enabled for the first time the InnoDB feature. > > I was surprised to find out that everithing worked fine > from the very beginning. > > The next day I start having "handler error" on non-inno tables of > other databases ! > > I ran myisamchk to check and fix the tables : there where the majority of > the tables > with index probles. > > I restarted mysql WITHOUT innodb support, everithing was OK again. > > I restarted mysql WITH innodb and I had the most of the tables (especially > the big ones) > corrupted again. > > I decided not use innodb :-( > > What could be wrong ? this is the first case I hear that InnoDB could corrupt MyISAM tables. ... > The only "peculiar" thing is that the db that (should) make use of innodb > tables , > has 2 MYISAM tables "linked" (ln -s) from another DB. Do you access the SAME MyISAM table BOTH from that other database AND from the database to which it is linked? If yes, MySQL does not know that they are actually the same table, and you will get corruption if you update the table in both databases. MySQL caches MyISAM index pages to key_buffer. > Could this be the tricky combo ? Try putting a table to only one database. You can refer to a table in another database with databasename.tablename There is really no reason to link a table so that it is 'seen' in two databases. If this symlinking is not the bug, then the next step is to upgrade your Linux kernel. There appear to be lots of file i/o bugs in different Linux hardware/driver/kernel combinations. > The following is the configuration of the cpu that runs mysql : > > OS : Linux (Mandrake 8.2) kernel 2.4.3-20 > Mysql : 4.0.4 > CPU : Pentium III 800 > RAM : 127 Mb > > Best Regards > Andrea Forghieri > Emmegi S.p.A. Best regards, Heikki Tuuri Innobase Oy - 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
Mysql 4.0.4 + InnoDB leads to corrupted tables ?
Hi, I recently updated from 4.0.3 do 4.0.4 . everithing was running fast ans smooth (as always). Then I enabled for the first time the InnoDB feature. I was surprised to find out that everithing worked fine from the very beginning. The next day I start having "handler error" on non-inno tables of other databases ! I ran myisamchk to check and fix the tables : there where the majority of the tables with index probles. I restarted mysql WITHOUT innodb support, everithing was OK again. I restarted mysql WITH innodb and I had the most of the tables (especially the big ones) corrupted again. I decided not use innodb :-( What could be wrong ? I set all the variables according to MySQL manual. I did not use extreme memory settings. I created all the requested directories. The only "peculiar" thing is that the db that (should) make use of innodb tables , has 2 MYISAM tables "linked" (ln -s) from another DB. Could this be the tricky combo ? The following is the configuration of the cpu that runs mysql : OS : Linux (Mandrake 8.2) kernel 2.4.3-20 Mysql : 4.0.4 CPU : Pentium III 800 RAM : 127 Mb Best Regards Andrea Forghieri Emmegi S.p.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 <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Bug in FLOOR() function
Dear Sirs, please try this with Mysql 4.0.2 SELECT 25*9.54; -> 238.5 (so far so good) then SELECT (25*9.54)+0.5; -> 239.000 (still OK ) SELECT FLOOR((25*9.54)+0.5); -> 238 (ouch !!) Best Regards Andrea Forghieri Emmegi S.p.A. # Useful info (?) VERSION :MySQL-4.0.2-2.i386.rpm VARIABLES : back_log 50 basedir / binlog_cache_size 32768 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 OFF connect_timeout 5 datadir /home/mysql/ delay_key_write OFF delayed_insert_limit 100 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 NO have_isam YES have_raid NO have_symlink YES have_openssl NO have_query_cache YES init_file interactive_timeout 28800 join_buffer_size 131072 key_buffer_size 16773120 language /usr/share/mysql/english/ large_files_support ON locked_in_memory OFF log OFF log_update OFF log_bin OFF log_slave_updates OFF log_slow_queries ON long_query_time 10 low_priority_updates OFF lower_case_table_names 0 max_allowed_packet 1047552 max_binlog_cache_size 4294967295 max_binlog_size 1073741824 max_connections 100 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_bulk_insert_tree_size 8388608 myisam_max_extra_sort_file_size 256 myisam_max_sort_file_size 2047 myisam_recover_options OFF myisam_sort_buffer_size 8388608 net_buffer_length 7168 net_read_timeout 30 net_retry_count 10 net_write_timeout 60 open_files_limit 0 pid_file /var/lib/mysql/mandrake.pid port 3306 protocol_version 10 record_buffer 131072 record_rnd_buffer 131072 rpl_recovery_rank 0 query_buffer_size 0 query_cache_limit 1048576 query_cache_size 0 query_cache_startup_type 1 safe_show_database OFF server_id 1 slave_net_timeout 3600 skip_locking ON skip_networking OFF skip_show_database OFF slow_launch_time 2 socket /var/lib/mysql/mysql.sock sort_buffer 524280 sql_mode 0 table_cache 64 table_type MYISAM thread_cache_size 0 thread_stack 65536 transaction_isolation READ-COMMITTED timezone EDT tmp_table_size 33554432 tmpdir /home/mysql/tmp/ version 4.0.2-alpha-log wait_timeout 28800 - 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
Create ... select bug
Dear Dirs, I think I' ve found a bug. Please run the following query (I know you don' t have my db, try something similar) CREATE TABLE order_cross SELECT date_format(data_iniz_num,'%y') as anno,ord_tmp.soc,ord_tmp.ml, ord_tmp.cod_agente, ord_tmp.linea, CASE WHEN month(data_ordine) = 1 then qty else 0 END as jan, CASE WHEN month(data_ordine) = 2 then qty else 0 END as feb, CASE WHEN month(data_ordine) = 3 then qty else 0 END as mar, CASE WHEN month(data_ordine) = 4 then qty else 0 END as apr, CASE WHEN month(data_ordine) = 5 then qty else 0 END as may, CASE WHEN month(data_ordine) = 6 then qty else 0 END as jun, CASE WHEN month(data_ordine) = 7 then qty else 0 END as jul, CASE WHEN month(data_ordine) = 8 then qty else 0 END as aug, CASE WHEN month(data_ordine) = 9 then qty else 0 END as sep, CASE WHEN month(data_ordine) = 10 then qty else 0 END as oct, CASE WHEN month(data_ordine) = 11 then qty else 0 END as nov, CASE WHEN month(data_ordine) = 12 then qty else 0 END as 'dec' FROM ord_tmp; ERROR GIVEN : ERROR 1105 at line xx : Unknown error I get the same error with queries like this (create - select - case ). With version 4.0.1 these queries used to work perfectly. Workaround : create the query , then insert-select :) KERNEL : 2.4 VERSION :MySQL-4.0.2-2.i386.rpm VARIABLES : back_log 50 basedir / binlog_cache_size 32768 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 OFF connect_timeout 5 datadir /home/mysql/ delay_key_write OFF delayed_insert_limit 100 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 NO have_isam YES have_raid NO have_symlink YES have_openssl NO have_query_cache YES init_file interactive_timeout 28800 join_buffer_size 131072 key_buffer_size 16773120 language /usr/share/mysql/english/ large_files_support ON locked_in_memory OFF log OFF log_update OFF log_bin OFF log_slave_updates OFF log_slow_queries ON long_query_time 10 low_priority_updates OFF lower_case_table_names 0 max_allowed_packet 1047552 max_binlog_cache_size 4294967295 max_binlog_size 1073741824 max_connections 100 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_bulk_insert_tree_size 8388608 myisam_max_extra_sort_file_size 256 myisam_max_sort_file_size 2047 myisam_recover_options OFF myisam_sort_buffer_size 8388608 net_buffer_length 7168 net_read_timeout 30 net_retry_count 10 net_write_timeout 60 open_files_limit 0 pid_file /var/lib/mysql/mandrake.pid port 3306 protocol_version 10 record_buffer 131072 record_rnd_buffer 131072 rpl_recovery_rank 0 query_buffer_size 0 query_cache_limit 1048576 query_cache_size 0 query_cache_startup_type 1 safe_show_database OFF server_id 1 slave_net_timeout 3600 skip_locking ON skip_networking OFF skip_show_database OFF slow_launch_time 2 socket /var/lib/mysql/mysql.sock sort_buffer 524280 sql_mode 0 table_cache 64 table_type MYISAM thread_cache_size 0 thread_stack 65536 transaction_isolation READ-COMMITTED timezone EDT tmp_table_size 33554432 tmpdir /home/mysql/tmp/ version 4.0.2-alpha-log wait_timeout 28800 Note : You did a great job with multi-table delete !!! THX for existing! Best Regards Andrea Forghieri Project Manager Emmegi S.p.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 <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Create ... select bug
Dear Dirs, I think I' ve found a bug. Please run the following query (I know you don' t have my db, try something similar) CREATE TABLE order_cross SELECT date_format(data_iniz_num,'%y') as anno,ord_tmp.soc,ord_tmp.ml, ord_tmp.cod_agente, ord_tmp.linea, CASE WHEN month(data_ordine) = 1 then qty else 0 END as jan, CASE WHEN month(data_ordine) = 2 then qty else 0 END as feb, CASE WHEN month(data_ordine) = 3 then qty else 0 END as mar, CASE WHEN month(data_ordine) = 4 then qty else 0 END as apr, CASE WHEN month(data_ordine) = 5 then qty else 0 END as may, CASE WHEN month(data_ordine) = 6 then qty else 0 END as jun, CASE WHEN month(data_ordine) = 7 then qty else 0 END as jul, CASE WHEN month(data_ordine) = 8 then qty else 0 END as aug, CASE WHEN month(data_ordine) = 9 then qty else 0 END as sep, CASE WHEN month(data_ordine) = 10 then qty else 0 END as oct, CASE WHEN month(data_ordine) = 11 then qty else 0 END as nov, CASE WHEN month(data_ordine) = 12 then qty else 0 END as 'dec' FROM ord_tmp; ERROR GIVEN : ERROR 1105 at line xx : Unknown error I get the same error with queries like this (create - select - case ). With version 4.0.1 these queries used to work perfectly. Workaround : create the query , then insert-select :) KERNEL : 2.4 VERSION :MySQL-4.0.2-2.i386.rpm VARIABLES : back_log 50 basedir / binlog_cache_size 32768 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 OFF connect_timeout 5 datadir /home/mysql/ delay_key_write OFF delayed_insert_limit 100 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 NO have_isam YES have_raid NO have_symlink YES have_openssl NO have_query_cache YES init_file interactive_timeout 28800 join_buffer_size 131072 key_buffer_size 16773120 language /usr/share/mysql/english/ large_files_support ON locked_in_memory OFF log OFF log_update OFF log_bin OFF log_slave_updates OFF log_slow_queries ON long_query_time 10 low_priority_updates OFF lower_case_table_names 0 max_allowed_packet 1047552 max_binlog_cache_size 4294967295 max_binlog_size 1073741824 max_connections 100 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_bulk_insert_tree_size 8388608 myisam_max_extra_sort_file_size 256 myisam_max_sort_file_size 2047 myisam_recover_options OFF myisam_sort_buffer_size 8388608 net_buffer_length 7168 net_read_timeout 30 net_retry_count 10 net_write_timeout 60 open_files_limit 0 pid_file /var/lib/mysql/mandrake.pid port 3306 protocol_version 10 record_buffer 131072 record_rnd_buffer 131072 rpl_recovery_rank 0 query_buffer_size 0 query_cache_limit 1048576 query_cache_size 0 query_cache_startup_type 1 safe_show_database OFF server_id 1 slave_net_timeout 3600 skip_locking ON skip_networking OFF skip_show_database OFF slow_launch_time 2 socket /var/lib/mysql/mysql.sock sort_buffer 524280 sql_mode 0 table_cache 64 table_type MYISAM thread_cache_size 0 thread_stack 65536 transaction_isolation READ-COMMITTED timezone EDT tmp_table_size 33554432 tmpdir /home/mysql/tmp/ version 4.0.2-alpha-log wait_timeout 28800 Note : You did a great job with multi-table delete !!! THX for existing! Best Regards Andrea Forghieri Project Manager Emmegi S.p.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 <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Unique indexes and case sensitivity bug(?)
>Description: >How-To-Repeat: >Fix: THANX >Submitter-Id: <[EMAIL PROTECTED]> >Originator: root >Organization: >MySQL support: [none ] >Synopsis: >Severity: >Priority: >Category: mysql >Class: >Release: mysql-4.0.1-alpha (Official MySQL RPM) >Server: /usr/bin/mysqladmin Ver 8.18 Distrib 3.23.36, 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 4.0.1-alpha-log Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 47 min 47 sec Threads: 6 Questions: 2429 Slow queries: 1 Opens: 69 Flush tables: 2 Open tables: 24 Queries per second avg: 0.847 >Environment: System: Linux mandrake 2.4.3-20mdksmp #1 SMP Sun Apr 15 22:32:27 CEST 2001 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.96/specs gcc version 2.96 2731 (Linux-Mandrake 8.0 2.96-0.48mdk) Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='gcc' -O6 -fno-omit-frame-pointer-felide-constructors -fno-exceptions -fno-rtti -mpentium' LDFLAGS='' LIBC: lrwxrwxrwx1 root root 13 ago 27 00:40 /lib/libc.so.6 -> libc-2.2.2.so -rwxr-xr-x1 root root 1216268 feb 21 2001 /lib/libc-2.2.2.so -rw-r--r--1 root root 26366908 feb 21 2001 /usr/lib/libc.a -rw-r--r--1 root root 178 feb 21 2001 /usr/lib/libc.so Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static --with-clien t-ldflags=-all-static --without-berkeley-db --with-innodb --enable-assembler --with-mysqld-user=mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ --with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/us r/sbin --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql --infodir=/usr/info --includedir=/usr/include --mandir=/usr/man --with-embe dded-server --enable-thread-safe-client '--with-comment=Official MySQL RPM' - 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