Index: java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
===================================================================
--- java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java	(revision 490535)
+++ java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java	(working copy)
@@ -2496,8 +2496,8 @@
 	        columns.grow(currentLength+1);
 	        curRow.setColumn(SYSCOLPERMSRowFactory.COLUMNS_COL_NUM,
 					  dvf.getDataValue((Object) columns));
-			ti.updateRow(keyRow, curRow,
-					SYSCOLPERMSRowFactory.TABLEID_INDEX_NUM,
+			ti.updateRow(uuidKey, curRow,
+					SYSCOLPERMSRowFactory.COLPERMSID_INDEX_NUM,
 					 bArray, 
 					 colsToUpdate,
 					 tc);
Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql	(revision 490535)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql	(working copy)
@@ -2043,3 +2043,16 @@
 close crs1;
 autocommit on;
 set connection user1;
+
+-- Another test for DERBY-1847: verify that columns field is updated
+-- correctly when adding a column to a table:
+create table d1847_c (a int, b int, c int);
+grant select (a) on d1847_c to first_user;
+grant update (b) on d1847_c to second_user;
+grant select (c) on d1847_c to third_user;
+select c.grantee, c.type, c.columns from sys.syscolperms c, sys.systables t
+    where c.tableid = t.tableid and t.tablename='D1847_C';
+alter table d1847_c add column d int;
+select c.grantee, c.type, c.columns from sys.syscolperms c, sys.systables t
+    where c.tableid = t.tableid and t.tablename='D1847_C';
+
Index: java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out	(revision 490535)
+++ java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out	(working copy)
@@ -3230,4 +3230,32 @@
 IJ ERROR: Unable to establish cursor
 ij(USER2)> autocommit on;
 ij(USER2)> set connection user1;
+ij(USER1)> -- Another test for DERBY-1847: verify that columns field is updated
+-- correctly when adding a column to a table:
+create table d1847_c (a int, b int, c int);
+0 rows inserted/updated/deleted
+ij(USER1)> grant select (a) on d1847_c to first_user;
+0 rows inserted/updated/deleted
+ij(USER1)> grant update (b) on d1847_c to second_user;
+0 rows inserted/updated/deleted
+ij(USER1)> grant select (c) on d1847_c to third_user;
+0 rows inserted/updated/deleted
+ij(USER1)> select c.grantee, c.type, c.columns from sys.syscolperms c, sys.systables t
+    where c.tableid = t.tableid and t.tablename='D1847_C';
+GRANTEE                                                                                                                         |&|COLUMNS        
+--------------------------------------------------------------------------------------------------------------------------------------------------
+FIRST_USER                                                                                                                      |s|{0}            
+SECOND_USER                                                                                                                     |u|{1}            
+THIRD_USER                                                                                                                      |s|{2}            
+3 rows selected
+ij(USER1)> alter table d1847_c add column d int;
+0 rows inserted/updated/deleted
+ij(USER1)> select c.grantee, c.type, c.columns from sys.syscolperms c, sys.systables t
+    where c.tableid = t.tableid and t.tablename='D1847_C';
+GRANTEE                                                                                                                         |&|COLUMNS        
+--------------------------------------------------------------------------------------------------------------------------------------------------
+FIRST_USER                                                                                                                      |s|{0}            
+SECOND_USER                                                                                                                     |u|{1}            
+THIRD_USER                                                                                                                      |s|{2}            
+3 rows selected
 ij(USER1)> 
