On Friday 07 March 2003 17:52, gluk at php4 dot ru wrote: > >Description: > > UPDATE command fail with multiple myisam tables with error: > ERROR 1142: update command denied to user: '[EMAIL PROTECTED]' for table '***' > This situation occures only when non-root user make UPDATE and > 'tables_priv' not empty (no matter what it contains). > Seems, that mysql ignores 'db' ad read 'tables_priv' first. >
Thank you for bug report! This is a patch from Sinisa Milivojevic: ===== /mnt/work/mysql-4.0/sql/sql_parse.cc 1.296 vs edited ===== *** /tmp/sql_parse.cc-1.296-21842 Fri Mar 7 12:55:04 2003 --- edited//mnt/work/mysql-4.0/sql/sql_parse.cc Mon Mar 10 16:38:09 2003 *************** *** 1840,1847 **** break; } case SQLCOM_UPDATE: ! if (check_access(thd,UPDATE_ACL,tables->db,&tables->grant.privilege)) goto error; if (grant_option && check_grant(thd,UPDATE_ACL,tables)) goto error; if (select_lex->item_list.elements != lex->value_list.elements) --- 1840,1853 ---- break; } case SQLCOM_UPDATE: ! TABLE_LIST *table; ! if (check_db_used(thd,tables)) goto error; + for (table=tables ; table ; table=table->next) + { + if (check_access(thd,UPDATE_ACL,table->db,&table->grant.privilege)) + goto error; + } if (grant_option && check_grant(thd,UPDATE_ACL,tables)) goto error; if (select_lex->item_list.elements != lex->value_list.elements) -- 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