05094dabf3d005ab35a998ff225443fc4255611f
galt
  Mon Feb 4 23:07:42 2019 -0800
Adding ability to backup and restore the cart and its custom tracks in hgSession.

diff --git src/hg/inc/jksql.h src/hg/inc/jksql.h
index 8a71d60..eb87e25 100644
--- src/hg/inc/jksql.h
+++ src/hg/inc/jksql.h
@@ -279,30 +279,36 @@
 /* return TRUE if column exists in table. tableName can contain sql wildcards  */
 
 int sqlTableSizeIfExists(struct sqlConnection *sc, char *table);
 /* Return row count if a table exists, -1 if it doesn't. */
 
 boolean sqlTablesExist(struct sqlConnection *conn, char *tables);
 /* Check all tables in space delimited string exist. */
 
 boolean sqlTableWildExists(struct sqlConnection *sc, char *table);
 /* Return TRUE if table (which can include SQL wildcards) exists.
  * A bit slower than sqlTableExists. */
 
 boolean sqlTableOk(struct sqlConnection *sc, char *table);
 /* Return TRUE if a table not only exists, but also is not corrupted. */
 
+unsigned long sqlTableDataSizeFromSchema(struct sqlConnection *conn, char *db, char *table);
+/* Get table data size. Table must exist or will abort. */
+
+unsigned long sqlTableIndexSizeFromSchema(struct sqlConnection *conn, char *db, char *table);
+/* Get table index size. Table must exist or will abort. */
+
 char *sqlQuickQuery(struct sqlConnection *sc, char *query, char *buf, int bufSize);
 /* Does query and returns first field in first row.  Meant
  * for cases where you are just looking up one small thing.
  * Returns NULL if query comes up empty. */
 
 char *sqlNeedQuickQuery(struct sqlConnection *sc, char *query,
 	char *buf, int bufSize);
 /* Does query and returns first field in first row.  Meant
  * for cases where you are just looking up one small thing.
  * Prints error message and aborts if query comes up empty. */
 
 int sqlQuickNum(struct sqlConnection *conn, char *query);
 /* Get numerical result from simple query. Returns 0
  * if query returns no result. */
 
@@ -376,30 +382,33 @@
 /* Hard lock given table list.  Unlock with sqlHardUnlockAll. */
 
 void sqlHardLockTable(struct sqlConnection *sc, char *table, boolean isWrite);
 /* Lock a single table.  Unlock with sqlHardUnlockAll. */
 
 void sqlHardLockAll(struct sqlConnection *sc, boolean isWrite);
 /* Lock all tables in current database.  Unlock with sqlHardUnlockAll. */
 
 void sqlHardUnlockAll(struct sqlConnection *sc);
 /* Unlock any hard locked tables. */
 
 boolean sqlMaybeMakeTable(struct sqlConnection *sc, char *table, char *query);
 /* Create table from query if it doesn't exist already.
  * Returns FALSE if didn't make table. */
 
+char *sqlGetCreateTable(struct sqlConnection *sc, char *table);
+/* Get the Create table statement. table must exist. */
+
 void sqlRemakeTable(struct sqlConnection *sc, char *table, char *create);
 /* Drop table if it exists, and recreate it. */
 
 char **sqlNextRow(struct sqlResult *sr);
 /* Fetch next row from result.  If you need to save these strings
  * past the next call to sqlNextRow you must copy them elsewhere.
  * It is ok to write to the strings - replacing tabs with zeroes
  * for instance.  You can call this with a NULL sqlResult.  It
  * will then return a NULL row. */
 
 char* sqlFieldName(struct sqlResult *sr);
 /* Repeated calls to this function returns the names of the fields
  * the given result. */
 
 struct slName *sqlResultFieldList(struct sqlResult *sr);