Changeset 10108 for trunk/psLib/src/db/psDB.c
- Timestamp:
- Nov 20, 2006, 10:57:51 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r10044 r10108 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.11 4$ $Name: not supported by cvs2svn $15 * @date $Date: 2006-11- 17 22:06:57$14 * @version $Revision: 1.115 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-11-20 20:57:51 $ 16 16 * 17 17 * Copyright (C) 2005-2006 Joshua Hoblitt, University of Hawaii … … 1784 1784 char *key; // hash tmp value 1785 1785 char *value; // hash tmp value 1786 char *sqlType;// copy of lookup table result1786 psString sqlType; // copy of lookup table result 1787 1787 psU32 pType; // psElemType of a field 1788 1788 … … 1791 1791 // lookup MySQL column type 1792 1792 key = psDBIntToString((psU64)type); 1793 sqlType = ps HashLookup(mysqlToSQLTable, key);1793 sqlType = psMemIncrRefCounter(psHashLookup(mysqlToSQLTable, key)); 1794 1794 psFree(key); 1795 1795 … … 1804 1804 // mysql -> ascii -> ptype 1805 1805 if (flags & UNSIGNED_FLAG) { 1806 psStringPrepend(&sqlType, "UNSIGNED "); 1807 } 1808 1809 //psLogMsg( __func__, PS_LOG_INFO, "sqlType=[%s]\n", sqlType ); 1806 psString new = NULL; 1807 psStringAppend(&new, "%s UNSIGNED", sqlType); 1808 psFree(sqlType); 1809 sqlType = new; 1810 } 1811 1812 //psTrace("psLib.db", 9, "sqlType=[%s]\n", sqlType ); 1810 1813 1811 1814 // convert MySQL type to PS type … … 1814 1817 1815 1818 if (!value) { 1816 psError(PS_ERR_UNEXPECTED_NULL, true, "type lookup failed.");1817 1819 psError(PS_ERR_UNEXPECTED_NULL, true, "type lookup of %s failed.", sqlType); 1820 psFree(sqlType); 1818 1821 return 0; 1819 1822 } 1823 psFree(sqlType); 1820 1824 1821 1825 pType = (psU32)atol(value);
Note:
See TracChangeset
for help on using the changeset viewer.
