Thanks!

We've applied this into 3.1.12 source (with minor modifications).



Shane Wegner wrote:
> 
> Hi,
> 
> The default MySQL max packet length is 1mb.  Often this
> length can be exceeded as Mnogosearch is now using extended
> inserts.  This patch limits insert queries into dict tables
> to 512k.  Applies against Mnogosearch 3.11.
> 
> --- sql.c.orig  Thu Mar  8 13:48:58 2001
> +++ sql.c       Thu Mar  8 14:10:46 2001
> @@ -2251,6 +2251,18 @@
>                                                 
>sprintf(qe,"(%d,%d,%d)",url_id,UdmStrCRC32(Indexer->Word[i].word),Indexer->Word[i].count);
>                                         }
>                                         qe=qe+strlen(qe);
> +                                       /* Insert 512k packets max to stay *
> +                                        * under MySQL's default limit. */
> +                                       if (strlen(qb) >= 512000){
> +                                               sql_query(Indexer,qb);
> +                                               
>if(UdmDBErrorCode(Indexer->db))return(IND_ERROR);
> +                                               
>if(Indexer->Conf->DBMode==UDM_DBMODE_MULTI)
> +                                               sprintf(qb,"INSERT INTO %s 
>(url_id,word,intag) VALUES ",tbl_nm);
> +                                               else
> +                                               sprintf(qb,"INSERT INTO %s 
>(url_id,word_id,intag) VALUES ",tbl_nm);
> +                                               qe=qb+strlen(qb);
> +                                               have_words = 0;
> +                                       }
>                                 }
>                         }
>                         if(have_words){
> 
> --
> Shane Wegner: [EMAIL PROTECTED]
>               http://www.cm.nu/~shane/
> PGP:          1024D/FFE3035D
>               A0ED DAC4 77EC D674 5487
>               5B5C 4F89 9A4E FFE3 035D
> ___________________________________________
> If you want to unsubscribe send "unsubscribe general"
> to [EMAIL PROTECTED]
___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]

Reply via email to