Summary: | ASTERISK-17157: [patch] ast_update2_realtime fails to update multiple columns with MySQL driver | ||
Reporter: | Makoto Dei (makoto) | Labels: | |
Date Opened: | 2010-12-24 02:10:55.000-0600 | Date Closed: | 2010-12-24 11:59:25.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Addons/res_config_mysql |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) res-config-mysql-update2.patch | |
Description: | For example, the following code fails with MySQL driver. ast_update2_realtime("table", "id", "1234", SENTINEL, "foo", "yes", "bar", "no", SENTINEL); This doesn't happens when updating single column. update2_mysql function in res_config_mysql.c generates an incorrect SQL sentence when updating multiple columns because variable first is not cleared in the second while loop. Attached patch will fix the problem. PostgreSQL driver seems to have the same problem. | ||
Comments: | By: Digium Subversion (svnbot) 2010-12-24 11:56:39.000-0600 Repository: asterisk-addons Revision: 1138 U branches/1.6.2/res/res_config_mysql.c ------------------------------------------------------------------------ r1138 | tilghman | 2010-12-24 11:56:38 -0600 (Fri, 24 Dec 2010) | 7 lines Reset 'first' variable after first usage. (closes issue ASTERISK-17157) Reported by: makoto Patches: res-config-mysql-update2.patch uploaded by makoto (license 38) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk-addons?view=rev&revision=1138 By: Digium Subversion (svnbot) 2010-12-24 11:58:31.000-0600 Repository: asterisk Revision: 299583 U branches/1.8/addons/res_config_mysql.c ------------------------------------------------------------------------ r299583 | tilghman | 2010-12-24 11:58:30 -0600 (Fri, 24 Dec 2010) | 7 lines Reset 'first' variable after usage. (closes issue ASTERISK-17157) Reported by: makoto Patches: res-config-mysql-update2.patch uploaded by makoto (license 38) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=299583 By: Digium Subversion (svnbot) 2010-12-24 11:59:24.000-0600 Repository: asterisk Revision: 299584 _U trunk/ U trunk/addons/res_config_mysql.c ------------------------------------------------------------------------ r299584 | tilghman | 2010-12-24 11:59:24 -0600 (Fri, 24 Dec 2010) | 14 lines Merged revisions 299583 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r299583 | tilghman | 2010-12-24 11:58:30 -0600 (Fri, 24 Dec 2010) | 7 lines Reset 'first' variable after usage. (closes issue ASTERISK-17157) Reported by: makoto Patches: res-config-mysql-update2.patch uploaded by makoto (license 38) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=299584 |