Browse code

Column version of table version renamed to table_version to avoid conflicts, reported by axelm@nic.at

Jan Janak authored on 25/04/2004 21:00:29
Showing 2 changed files
... ...
@@ -186,9 +186,9 @@
186 186
 #define DEFAULT_RODB_URL "mysql://serro:47serro11@localhost/ser"
187 187
 #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1)
188 188
 
189
-/* table holdin versions of other ser tables */
189
+/* table holding versions of other ser tables */
190 190
 #define VERSION_TABLE "version"
191
-#define VERSION_COLUMN "version"
191
+#define VERSION_COLUMN "table_version"
192 192
 #define TABLENAME_COLUMN "table_name"
193 193
 
194 194
 /* minimum packet size; smaller packets will be dropped silently */
... ...
@@ -226,7 +226,7 @@ GRANT SELECT ON $1.* TO ${ROUSER}@$DBHOST IDENTIFIED BY '$RO_PW';
226 226
 
227 227
 CREATE TABLE version (
228 228
    table_name varchar(64) NOT NULL,
229
-   version smallint(5) DEFAULT '0' NOT NULL
229
+   table_version smallint(5) DEFAULT '0' NOT NULL
230 230
 ) $TABLE_TYPE;
231 231
 
232 232
 #
... ...
@@ -717,12 +717,18 @@ case $1 in
717 717
 		fi
718 718
 		#5 restoring table content
719 719
 		echo "restoring table content"
720
+
721
+		# Recreate perms column here so that subsequent
722
+		# restore succeeds
723
+		
720 724
 		ser_restore $DBNAME ${tmp_file}.2
721 725
 		if [ "$?" -ne 0 ] ; then
722 726
 			echo "reinstall: restoring table failed"
723 727
 			rm $tmp_file*
724 728
 			exit 1
725 729
 		fi
730
+		
731
+		# Drop perms column here
726 732
 #XX
727 733
 #		rm $tmp_file*
728 734
 		exit 0