1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120 10121 10122 10123 10124 10125 10126 10127 10128 10129 10130 10131 10132 10133 10134 10135 10136 10137 10138 10139 10140 10141 10142 10143 10144 10145 10146 10147 10148 10149 10150 10151 10152 10153 10154 10155 10156 10157 10158 10159 10160 10161 10162 10163 10164 10165 10166 10167 10168 10169 10170 10171 10172 10173 10174 10175 10176 10177 10178 10179 10180 10181 10182 10183 10184 10185 10186 10187 10188 10189 10190 10191 10192 10193 10194 10195 10196 10197 10198 10199 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220 10221 10222 10223 10224 10225 10226 10227 10228 10229 10230 10231 10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 10243 10244 10245 10246 10247 10248 10249 10250 10251 10252 10253 10254 10255 10256 10257 10258 10259 10260 10261 10262 10263 10264 10265 10266 10267 10268 10269 10270 10271 10272 10273 10274 10275 10276 10277 10278 10279 10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 10291 10292 10293 10294 10295 10296 10297 10298 10299 10300 10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 10312 10313 10314 10315 10316 10317 10318 10319 10320 10321 10322 10323 10324 10325 10326 10327 10328 10329 10330 10331 10332 10333 10334 10335 10336 10337 10338 10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408
|
<html>
<head>
<title>The mSQL FAQ</title>
</head>
<body bgcolor="#ccccff">
<center>
<h1><a name="top">The mSQL FAQ</a></h1>
</center>
<h4><a name="rcs-revision">$Revision: 1.1 $</a></h4>
<h4><a name="rcs-date">$Date: 1998/02/10 21:18:45 $</a></h4>
<center>
<h2><a name="preamble">Preamble</a></h2>
</center>
A text copy of this FAQ can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/faq.txt">ftp://bond.edu.au/pub/Minerva/msql/faq.txt</a>
</pre>
or an HTML copy can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/faq.html">ftp://bond.edu.au/pub/Minerva/msql/faq.html</a>
</pre>
This FAQ is maintained by
<a href="http://www.uniq.com.au/people/peters.html">Peter Samuel</a>
<a href="mailto:Peter.Samuel@uniq.com.au">
<Peter.Samuel@uniq.com.au></a> and is produced independently of
Hughes Technologies (the developers of mSQL). <p>
While every attempt is made to ensure that the information contained in
this FAQ is accurate, no guarantees of accuracy can or will be made. <p>
This FAQ attempts to deal with mSQL. Because of time and space
constraints, other applications, including value added applications
provided with the mSQL distribution such as W3-mSQL and Lite, will not
be covered in any great detail. <p>
<a href="#other-apps">Third party applications</a> mentioned in this
FAQ may not be compatible with the current release of mSQL - by
necessity their development will lag that of mSQL. If you have any
questions concerning their status please contact the
<a href="#mailing-list">mSQL mailing list</a> or the author of the
application in question. <p>
New questions in the FAQ are marked with <b>(=)</b>. Questions that
have been modified since the last release of the FAQ are marked with
<b>(-)</b>. <p>
<b>Note: BEFORE POSTING A QUESTION TO THE <a href="#mailing-list">mSQL
MAILING LIST</a>, PLEASE READ THE SECTION <a href="#posting"> "How
do I post a question to the mSQL mailing list"</a>.</b> <p>
<hr>
<hr width="75%">
<center>
<h2><a name="contents">Contents</a></h2>
</center>
<ul>
<li><b><a href="#general">General Information</a></b>
<ol>
<li> (=) <a href="#faq-covers">What is covered by this FAQ?</a>
<li> <a href="#what-is-sql">What is SQL?</a>
<li> <a href="#sqlbooks">Books on SQL and mSQL?</a>
<li> <a href="#what-is-msql">What is mSQL?</a>
<li> <a href="#platforms">What platforms will it run on?</a>
<li> <a href="#shareware">Is it free?</a>
<li> <a href="#where-is">Where can I get it?</a>
<li> (-) <a href="#mirrors">Are there any mirror sites for
mSQL?</a>
<li> <a href="#current-version">What is the latest version?</a>
<li> <a href="#next-version">When will the next version be
released?</a>
<li> (=) <a href="#beta-software">What is Beta-release
software?</a>
<li> <a href="#why-bambi">Why is David called Bambi?</a>
<li> <a href="#prepared">How is this FAQ prepared?</a>
<li> <a href="#helping-hand">How can I contribute to the FAQ?</a>
</ol>
<p>
<li><b><a href="#help-and-support">Help and Support</a></b>
<ol>
<li> <a href="#recommended-patches">Are there any recommended
patches to the latest version?</a>
<li> <a href="#known-bugs">Are there any known bugs or problems
with the current release of mSQL?</a>
<li> (-) <a href="#version2">What are the current problems with
mSQL 2.0B<i>x</i>?</a>
<li> <a href="#other-patches">Are there any other
patches available?</a>
<li> <a href="#how-to-patch">How do I apply patches to the mSQL
source?</a>
<li> <a href="#online-doco">Is online documentation
available?</a>
<li> <a href="#mailing-list">Is there a mailing list for
mSQL?</a>
<li> <a href="#mailing-list-digest">Is there a mailing list digest
for mSQL?</a>
<li> (-) <a href="#html-mail">Are there any HTML archives of the mSQL
mailing list?</a>
<li> <a href="#news-group">Is there a news group for mSQL?</a>
<li> <b><font size="+1"><a href="#posting">How do I post a
question to the mSQL mailing list? (PLEASE READ
THIS!)</a></font></b>
<li> <a href="#current-bug">I've found a bug. How can I tell if
it's been fixed yet?</a>
<li> <a href="#reporting-bugs">How do I report a bug in mSQL?</a>
<li> <a href="#contrib-patches">How do I contribute a patch to
mSQL?</a>
<li> <a href="#contrib-code">How do I contribute code to the mSQL
community?</a>
<li> <a href="#code-examples">Where can I find examples of code
that interface with mSQL?</a>
<li> <a href="#porting">Are there any non Unix ports of
mSQL?</a>
</ol>
<p>
<li><b><a href="#features-and-limits">Features and Limitations</a></b>
<ol>
<li> <a href="#support-progs">What support programs are bundled
with mSQL?</a>
<li> <a href="#sql-commands">What SQL commands are
supported?</a>
<li> <a href="#keys">Does mSQL support keys?</a>
<li> <a href="#datatypes">What datatypes are supported?</a>
<li> <a href="#api">What functions does the mSQL API provide?</a>
<li> <a href="#views">Are views or virtual tables supported?</a>
<li> <a href="#table-aliasing">Does mSQL support table
aliasing?</a>
<li> <a href="#column-constraints">Are column constraints
supported?</a>
<li> <a href="#stored-procedures">Are stored procedures
supported?</a>
<li> <a href="#acl">Are access privileges supported?</a>
<li> <a href="#blobs">Does mSQL support BLOBs?</a>
<li> <a href="#transactions">Are the transaction commands, BEGIN,
COMMIT, and ROLLBACK supported?</a>
<li> <a href="#table-limits">What are the limits on table and
field names?</a>
<li> <a href="#user-limits">What other limits can be modified?</a>
<li> <a href="#db-size">How much data can mSQL address?</a>
<li> <a href="#expressions">Are there any limitations in the way
mSQL handles logical expressions?</a>
<li> <a href="#return-values">How does mSQL return values?</a>
<li> <a href="#return-order">How does SELECT return rows?</a>
<li> <a href="#nested-tables">Can mSQL nest tables?</a>
<li> <a href="#storage-overhead">What storage overheads does mSQL
have?</a>
<li> <a href="#ram">Does <tt>msqld</tt> allocate more RAM to itself
as new databases are added?</a>
<li> <a href="#perform">Does performance degrade as the number of
databases increase?</a>
<li> <a href="#cursors">Does mSQL support cursors?</a>
<li> <a href="#intl">Does mSQL support different character
sets?</a>
<li> <a href="#afs">Why doesn't mSQL work when installed in
disk space served by the Andrew File System (AFS)?</a>
</ol>
<p>
<li><b><a href="#install-problems">Installation Problems</a></b>
<ol>
<li> <a href="#irix-username">Under IRIX (SGI) I get problems
relating to my username</a>
<li> <a href="#osf1-hpux">On OSF/1 or HP-UX I have trouble starting
<tt>msqld</tt> at boot time</a>
<li> <a href="#osf1-gcc">Should I use <tt>cc</tt> or <tt>gcc</tt>
when building mSQL on my Dec Alpha running OSF/1?</a>
<li> <a href="#linux-mmap">Does mSQL work with Linux
<tt>mmap()</tt>?</a>
<li> <a href="#hpux-compile">Does mSQL work with HP-UX?</a>
<li> <a href="#hpux-perl">I'm having trouble compiling
MsqlPerl with mSQL under HP-UX</a>
<li> <a href="#sco-unix">How can I install mSQL on a SCO Unix
system?</a>
<li> <a href="#linux-setup">Why does <tt>setup</tt> fail when
building mSQL on a Linux system?</a>
<li> <a href="#solaris">Why won't my third party applications
compile under Solaris 2.<i>x</i>?</a>
<li> <a href="#linux-setup">Why can't I run <tt>setup</tt>
under Linux?</a>
<li> <a href="#bind49">Why do I get errors about
"<tt>sys/bitypes.h</tt>" when compiling under Solaris
2.5?</a>
<li> <a href="#makedepend">Why do I get errors about
"<tt>POSIX_C_SOURCE</tt>" when compiling under
Solaris 2.5?</a>
<li> <a href="#sgi-libs">Why do I get errors about
"<tt>weak definitions</tt>" when compiling under
IRIX?</a>
<li> <a href="#aix-ps2">How can I build mSQL version 1.0.16 for
an AIX system running on an IBM PS/2?</a>
<li> <a href="#apache-auth">How can I make <tt>w3-auth.c</tt>
work with my Apache HTTPD server?</a>
</ol>
<p>
<li><b><a href="#runtime-problems">Runtime Problems</a></b>
<ol>
<li> <a href="#root-user"><tt>msqladmin</tt> will not let me create
a database</a>
<li> <a href="#acl-file">When I start <tt>msqld</tt> it complains
about an ACL file</a>
<li> <a href="#pid-file">When I start <tt>msqld</tt> it complains
about a PID file</a>
<li> <a href="#recompile">I've just installed the latest version of
mSQL and now my own applications won't work!</a>
<li> <a href="#setuid">Access control doesn't work with my
setuid applications</a>
<li> <a href="#address-in-use">Why do I see an "<tt>Address
already in use</tt>" error message when I attempt to start
<tt>msqld</tt>?</a>
<li> <a href="#bind-permissions">Why do I see a "<tt>Can't
start server : UNIX Bind : Permission denied</tt>" error
message when I attempt to start <tt>msqld</tt>?</a>
<li> <a href="#tmpdir">Why do I see "<tt>Couldn't create
temporary table</tt>" error messages?</a>
<li> <a href="#tmp-space">How can I avoid running out of space
when doing certain complex table joins?</a>
<li> <a href="#bzero-missing"><tt>msqld</tt> is suddenly
dumping core and complaining about <tt>bzero()</tt></a>
<li> <a href="#bsdlib">Why does <tt>relshow</tt> drop the first
two characters from its output?</a>
<li> <a href="#msqladmin">Why won't <tt>msqladmin</tt>
work?</a>
<li> <a href="#sgi-reals">Why does <tt>msqld</tt> crash when
attempting to display real numbers on 64-bit SGI platforms?</a>
<li> <a href="#aix-compress">Why won't mSQL work with the
compressed file system under AIX?</a>
<li> <a href="#hpux-index">Why do I see "<tt>Protocol
mismatch"</tt> errors under HP-UX?</a>
<li> <a href="#machten">Why do I see <tt>"Can't start
server : UNIX Bind : Invalid argument"</tt> errors
running <tt>msqld</tt> under a MachTen BSD Unix system?</a>
<li> <a href="#socket-location">Where did my mSQL socket file
go?</a>
<li> <a href="#slow-connections">Why does it take such a long
time to connect to the mSQL database server?</a>
<li> <a href="#beta-expire">Why do I see <tt>"This Beta
test release expires in 57 days"</tt> when I start
<tt>msql2d</tt>?</a>
<li> <a href="#acl-ips">Can I use IP addresses in the mSQL ACL
file?</a>
<li> <a href="#protocol-mismatch">What does the "Protocol
mismatch. Server Version = 22 Client Version = 6" error
mean?</a>
<li> <a href="#query-ordering">Why does mSQL take longer to
return the same results when I change the order of my
query?</a>
<li> <a href="#multi-table-selects">Why don't my SELECT
statements work across multiple tables?</a>
</ol>
<p>
<li><b><a href="#how-do-i">How do I ....?</a></b>
<ol>
<li> <a href="#single-quotes">How do I embed single quotes in a
field?</a>
<li> <a href="#escape-chars">What other characters need special
treatment?</a>
<li> <a href="#null-fields">How do I handle null fields?</a>
<li> <a href="#no-case">How do I perform case insensitive
matches?</a>
<li> <a href="#add-column">How do I add a column to an existing
table?</a>
<li> <a href="#parent-child">When should I call
<tt>msqlConnect()</tt> in a parent/child situation?</a>
<li> <a href="#reserved-words">Can I use mSQL reserved words as
field or table names?</a>
<li> <a href="#maxmin">How do I find the maximum or minimum value
in a table?</a>
<li> <a href="#schema">How can I determine the structure of a
database?</a>
<li> <a href="#reconnect">What happens when the mSQL server
goes down between requests?</a>
<li> <a href="#muli-servers">Can I run more than one copy of
<tt>msqld</tt> on the same CPU?</a>
<li> <a href="#unique-keys">How can I automatically ensure that
each record receives a unique primary key?</a>
<li> <a href="#multiple-includes">How can I avoid compiler
redefinition errors when compiling my own mSQL applications?</a>
<li> <a href="#linking">How do I link the mSQL library with my own
code?</a>
<li> <a href="#numrows">How can I find the number of rows in a
table?</a>
<li> <a href="#delete-all">How can I delete all the rows in a table
without destroying the table structure?</a>
<li> <a href="#ascii-import">How can I import flat files or
other database formats into an mSQL table?</a>
<li> <a href="#touched">How can I determine the number of rows
affected by my last query?</a>
<li> <a href="#w3auth">How can I get <tt>w3-msql</tt> to work
with <tt>w3-auth</tt>?</a>
</ol>
<p>
<li> (-) <b><a href="#other-apps">Contributed Code and Third Party
Applications</a></b> <p>
<li> (-) <b><a href="#web-sites">Web sites using mSQL</a></b>
</ul>
<hr>
<hr width="75%">
<center>
<h2><a name="general">General Information</a></h2>
</center>
<h3><a name="faq-covers">What is covered by this FAQ?</a></h3>
This FAQ covers mSQL itself. It does not attempt to answer questions
about various value added packages such as <a href="#w3-msql">W3-mSQL</a>,
<a href="#perl">MsqlPerl</a>, <a href="#tcl">msqltcl</a>,
<a href="#php">PHP/FI</a>, etc in any great detail. Nor does it attempt
to address problems integrating HTML and mSQL in anything but a cursory
manner. <p>
The reasons for this limited scope are simple - time and space. I
maintain the FAQ out of the goodness/madness of my heart. I simply
don't have the time to cover everything - if I did cover everything I'd
never get any real work done and I'd starve :( <p>
The FAQ is also quite large - 297k as of release 1.32 and growing. If I
could include minute details about all the value added mSQL products
you'd be looking at a very large document indeed (or several large
documents). This is the sort of problem I don't have the time to deal
with :) <p>
There is a bright side however. I'm perfectly willing to accept
contributions to the FAQ on <b>ANY</b> mSQL related issue - in fact I
highly encourage it. If you have details concerning an area of mSQL
that you'd like included in the FAQ, write it up and send it to me
<a href="mailto:Peter.Samuel@uniq.com.au">
<Peter.Samuel@uniq.com.au></a>. <p>
Some of the value added products have mailing lists and home pages.
See the <a href="#other-apps">"Contributed Code and Third Party
Applications"</a> section for details. <p>
<hr>
<h3><a name="what-is-sql">What is SQL?</a></h3>
The following section is based on chapter 1 of "Oracle7 Server -
SQL Language Reference Manual" - Oracle Corporation, December
1992, part number 778-70-1292. <p>
<b>SQL</b> is an acronym that stands for <b>S</b>tructured <b>Q</b>uery
<b>L</b>anguage. It is often pronounced "<i>sequel</i>". It
was developed in the mid 1970s by IBM. <p>
The American National Standards Institute (ANSI) and the International
Standards Organisation (ISO) have adopted SQL as the standard language
for relational database management systems. <p>
SQL provides commands for a variety of tasks including: <p>
<ul>
<li> querying data
<li> inserting, updating and deleting rows in a table
<li> creating, replacing, altering and dropping objects
<li> controlling access to the database and its objects
<li> guaranteeing database consistency and integrity
</ul>
SQL provides easy to learn commands that are both consistent and
applicable for all users. <p>
While most relational database management systems - including mSQL -
provide support for SQL, each vendor usually has their own unique
extensions to the language that may hinder the portability of SQL
procedures from one database platform to another. <p>
JCC Consulting <a href="http://www.jcc.com">http://www.jcc.com</a>
maintains a central source of information about the SQL standards
process and its current state. For more details visit: <p>
<pre>
<a href="http://www.jcc.com/sql_stnd.html">http://www.jcc.com/sql_stnd.html</a>
</pre>
<hr>
<h3><a name="sqlbooks">Books on SQL and mSQL</a></h3>
There are countless books available on database design and SQL. Some
good starting points (in no particular order) are: <p>
<pre>
<font size="-1">
C. J. Date
"An Introduction to Database Systems"
Vol I, Sixth Edition, 1995
Addison Wesley
ISBN 0-201-54329-X
(<a href="http://heg-school.aw.com/cseng/authors/date/intro/intro.html">http://heg-school.aw.com/cseng/authors/date/intro/intro.html</a>)
C. J. Date and Hugh Darwen
"A Guide to Sql Standard"
Fourth Edition, 1997
Addison Wesley
ISBN 0-201-96426-0
(<a href="http://heg-school.aw.com/cseng/authors/date/sql/sql.html">http://heg-school.aw.com/cseng/authors/date/sql/sql.html</a>)
Judith S. Bowman, Sandra L. Emerson and Marcy Darnovsky
"The Practical SQL Handbook: Using Structured Query Language"
Third Edition
Addison Wesley
ISBN 0-201-44787-8
(<a href="http://www.awl.com/devpress/titles/44787.html">http://www.awl.com/devpress/titles/44787.html</a>)
Terry Halpin
"Conceptual Schema and Relational Database Design"
1995
Prentice Hall
ISBN 0-13-355702-2
(<a href="http://www.prenhall.com/allbooks/ptr_0133557022.html">http://www.prenhall.com/allbooks/ptr_0133557022.html</a>)
Joe Celko
"Instant SQL Programming"
1995
Wrox Press
ISBN 1-874416-508
(<a href="http://www.wrox.com/scripts/bookdetail.idc?Code=508">http://www.wrox.com/scripts/bookdetail.idc?Code=508</a>)
Martin Gruber
"Understanding SQL"
1990
Sybex Publishing
ISBN 0-89588-644-8
(<a href="http://www.sybex.com/cgi-bin/bookpg.pl?644back.html">http://www.sybex.com/cgi-bin/bookpg.pl?644back.html</a>)
Jeff Rowe
"Building Internet Database Servers with CGI"
1996
New Riders Publishing
ISBN 1-56205-573-9
(<a href="http://merchant.superlibrary.com:8000/catalog/hg/PRODUCT/PAGE/15620/bud/1562055739.html">http://merchant.superlibrary.com:8000/catalog/hg/PRODUCT/PAGE/15620/bud/1562055739.html</a>)
Perkins & Morgan
"Teach yourself SQL in 14 days"
1995
SAMS Publishing
ISBN 0-67230-855-X
(<a href="http://www.connection.se/cgi-bin/shop/method=showitem/sid=bm/uid=78F52F3/item=067230855X">http://www.connection.se/cgi-bin/shop/method=showitem/sid=bm/uid=78F52F3/item=067230855X</a>
or
<a href="http://merchant.superlibrary.com:8000/catalog/hg/PRODUCT/PAGE/06723/bud/067230855X.html">http://merchant.superlibrary.com:8000/catalog/hg/PRODUCT/PAGE/06723/bud/067230855X.html</a>)
Connolly, Begg & Strachan
"Database Systems: A Practical Approach to Design,
Implementation and Management"
1996
Addison Wesley
ISBN 0-201-42277-8
(<a href="http://heg-school.aw.com/cseng/authors/connolly/databsys/databsys.html">http://heg-school.aw.com/cseng/authors/connolly/databsys/databsys.html</a>)
Melton & Simon
"Understanding the New SQL: A Complete Guide"
1993
Morgan Kaufmann
ISBN 1-55860-245-3
Mike Morgan & Jeff Wandling
"Webmaster Expert Solutions"
1996
QUE books
ISBN 0-7897-0801-9
(<a href="http://merchant.superlibrary.com:8000/catalog/hg/PRODUCT/PAGE/07897/bud/0789708019.html">http://merchant.superlibrary.com:8000/catalog/hg/PRODUCT/PAGE/07897/bud/0789708019.html</a>)
(see <a href="http://www.speakeasy.org/~jdw">http://www.speakeasy.org/~jdw</a> for errata)
Ramez Elmasri and Shamkant B. Navathe
"Fundamentals of Database Systems"
Second Edition
Addison Wesley
ISBN 0-8053-1748-1
(<a href="http://heg-school.aw.com/cseng/authors/elmasri/Dbase2e/Dbase2e.html">http://heg-school.aw.com/cseng/authors/elmasri/Dbase2e/Dbase2e.html</a>)
</font>
</pre>
<hr>
<h3><a name="what-is-msql">What is mSQL?</a></h3>
mSQL is mini SQL, a light weight database engine developed by
<a href="http://Bond.edu.au/Bond/Admin/ITS/People/bambi">
David J. Hughes</a>
<a href="mailto:bambi@hughes.com.au"><bambi@hughes.com.au></a> at
<a href="http://bond.edu.au">Bond University</a>, Australia. It has
been designed to provide fast access to stored data with low memory
requirements. As its name implies mSQL offers a subset of SQL as its
query interface. Although it only supports a subset of SQL, everything
it supports is in accordance with the ANSI SQL specification. <p>
<hr>
<h3><a name="platforms">What platforms will it run on?</a></h3>
mSQL has been developed under Sun OS 4.1.1 but has been tested under
Solaris 2.<i>x</i> (release 2.3, 2.4 and 2.5), Ultrix 4.3, Linux, and
OSF/1 (cc not gcc). That said, it should "<tt>autoconf</tt>"
and build on most BSD derived systems, SVR4 based systems or POSIX
O/S's (that should cover most of them). It has been reported that it
works out-of-the-box on HP-UX, NeXT, SCO, Sequent, Cray, Tandem, *BSD
and a few others. <p>
<hr>
<h3><a name="shareware">Is it free?</a></h3>
David Hughes writes: <p>
<pre>
"mSQL has been released in the past under terms known as
'conscience-ware', the basic concept of which was that companies
that used the software could contribute a small amount to the
continued development of the software without any strict rules
being placed upon such 'donations'. Although the concept sounds
fair, it failed badly with only 3 contributions being made from
over 3,600 copies of mSQL-1.0.5 that were ftp'ed from my machine
alone. Over 1,000 of those copies went to commercial organisations
and I receive many questions a day from companies using mSQL behind
their WWW servers etc who are looking for free support. <p>
In an attempt to balance this out and allow me to devote some time
to mSQL (rather than other pursuits that I do to generate an
income), mSQL is now shareware. I still believe in free software
over the Internet and cooperation in research so the new license is
designed not to hurt Universities, research groups and other people
that _should_ have free access to software. Commercial
organisations that are using this so that they don't have to buy an
Oracle or an Ingres will now have to buy mSQL (at a minute fraction
of the cost of one of the commercial offerings). <p>
Please read the doc/License file to see if you are required to
register your copy. An invoice is included in both Postscript and
ASCII format to ease the generation of payments."
</pre>
You may freely use mSQL if and only if you fall into the categories
outlined in the mSQL License file: <p>
<pre>
You can use this software free of charge if you are an educational
institution (excluding commercial training organisations),
non-commercial research organisation, registered charity,
registered not-for-profit organisation, or full-time student.
</pre>
If you do not fall into any of these categories, you will have to pay
a license fee to use mSQL. As of release 1.0.16, the cost of mSQL is:
<p>
<pre>
Commercial Installation - AUD $225
Private Installation - AUD $65
</pre>
Exchange rates may vary wildly, but at the time of preparing this FAQ,
the Australian dollar was trading at about 0.75 US dollars. This
information is provided as an indication only. You MUST check your
local exchange rates before preparing to purchase mSQL. <p>
An online currency conversion system developed by
<a href="http://www.olsen.ch">Olsen & Associates</a> is available
at <a href="http://www.olsen.ch/cgi-bin/exmenu">
http://www.olsen.ch/cgi-bin/exmenu</a>. <p>
Another online currency conversion system is available from
<a href="http://www.DynaMind-LLC.com/services/utilities/currency.cgi">
http://www.DynaMind-LLC.com/services/utilities/currency.cgi</a>. <p>
<hr>
<h3><a name="where-is">Where can I get it?</a></h3>
mSQL 1.<i>x</i> can be obtained via anonymous ftp from
<a href="http://bond.edu.au">Bond University</a>, Australia. The latest
version of release 1.<i>x</i> can be found in the directory: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/">ftp://bond.edu.au/pub/Minerva/msql/</a>
</pre>
The latest beta version of 2.<i>x</i> can be found at: <p>
<pre>
<a href="http://hughes.com.au/software/msql2/current.htm">http://hughes.com.au/software/msql2/current.htm</a>
</pre>
<hr>
<h3><a name="mirrors">Are there any mirror sites for mSQL?</a></h3>
If you would like to mirror the mSQL FAQ, please contact
<a href="mailto:Peter.Samuel@uniq.com.au">
<Peter.Samuel@uniq.com.au></a>. <p>
The following sites mirror the mSQL FAQ: <p>
<ul>
<li> <a href="http://www.swl.fh-heilbronn.de/msql">
http://www.swl.fh-heilbronn.de/msql</a> <p>
Thanks to Tobias Haecker
<a href="mailto:tobi@swl.fh-heilbronn.de">
<tobi@swl.fh-heilbronn.de></a>. <p>
<li> <a href="ftp://ftp.nerosworld.com/pub/SQL/msql">
ftp://ftp.nerosworld.com/pub/SQL/msql</a> <p>
Thanks to David Perry <a href="mailto:deperry@nerosworld.com">
<deperry@nerosworld.com></a>. <p>
<li> <a href="http://cal038031.student.utwente.nl/~mSQL">
http://cal038031.student.utwente.nl/~mSQL</a> or
<a href="ftp://cal038031.student.utwente.nl/pub/mSQL">
ftp://cal038031.student.utwente.nl/pub/mSQL</a> <p>
Thanks to Sjoerd de Heer
<a href="mailto:sjoerd@cal038031.student.utwente.nl">
<sjoerd@cal038031.student.utwente.nl></a>. <p>
<li> <a href="http://sunsite.srce.hr/mirror/mSQL-FAQ/faq.html">
http://sunsite.srce.hr/mirror/mSQL-FAQ/faq.html</a> <p>
Thanks to Davorin Bengez
<a href="mailto:Davorin.Bengez@sunsite.srce.hr">
<Davorin.Bengez@sunsite.srce.hr></a>. <p>
<li>
<a href="http://www.gold-cousins.org/lite_site/ftp/faq.html">
http://www.gold-cousins.org/lite_site/ftp/faq.html</a> <p>
Thanks to Jeanne Gold <a href="mailto:goldsaic@ix.netcom.com">
<goldsaic@ix.netcom.com></a>. <p>
<li>
<a href="http://tcts.fpms.ac.be/~zanoni/msql/faq.html">
http://tcts.fpms.ac.be/~zanoni/msql/faq.html</a> <p>
Thanks to Laurent Zanoni
<a href="mailto:zanoni@tcts.fpms.ac.be">
<zanoni@tcts.fpms.ac.be></a>. <p>
<li>
<a href="http://audi.dglnet.com.br/saito/mirrors/msql/faq.html">
http://audi.dglnet.com.br/saito/mirrors/msql/faq.html</a> and <br>
<a href="http://audi.dglnet.com.br/saito/mirrors/msql/faq.txt">
http://audi.dglnet.com.br/saito/mirrors/msql/faq.txt</a> <p>
Thanks to Ricardo Saito <a href="mailto:rtsaito@dglnet.com.br">
<rtsaito@dglnet.com.br></a>. <p>
<li>
<a href="http://www.blnet.com/msqlpc/lozano/msqlfaq.htm">
http://www.blnet.com/msqlpc/lozano/msqlfaq.htm</a>. <p>
Thanks to Fernando Lozano <a href="mailto:bl@blnet.com">
<bl@blnet.com></a>.
</ul>
The following sites mirror the mSQL 1.<i>x</i> software distribution:
<p>
<ul>
<li> <a href="ftp://ftp.ntua.gr/pub/databases/msql/">
ftp://ftp.ntua.gr/pub/databases/msql/</a> <p>
Thanks to Yiorgos Adamopoulos
<a href="mailto:adamo@noc.ntua.gr"><adamo@noc.ntua.gr></a>.
<p>
<li> <a href="ftp://sunsite.auc.dk/pub/databases/msql">
ftp://sunsite.auc.dk/pub/databases/msql</a> <p>
Thanks to Jesper Hagen <a href="mailto:hagen@iesd.auc.dk">
<hagen@iesd.auc.dk></a> <p>
<li> <a href="ftp://ftp.nerosworld.com/pub/SQL/msql">
ftp://ftp.nerosworld.com/pub/SQL/msql</a> <p>
Thanks to David Perry <a href="mailto:deperry@nerosworld.com">
<deperry@nerosworld.com></a>. <p>
<li>
<a href="ftp://sunsite.srce.hr/mirrors/bond.edu.au/pub/Minerva/msql/msql">
ftp://sunsite.srce.hr/mirrors/bond.edu.au/pub/Minerva/msql/msql</a>
<p>
Thanks to Davorin Bengez
<a href="mailto:Davorin.Bengez@sunsite.srce.hr">
<Davorin.Bengez@sunsite.srce.hr></a>. <p>
<li> <a href="ftp://ftp.bf.rmit.edu.au/pub/msql">
ftp://ftp.bf.rmit.edu.au/pub/msql</a> <p>
Thanks to Malcolm Herbert
<a href="mailto:mjch@boojum.bf.rmit.edu.au">
<mjch@boojum.bf.rmit.edu.au></a>.
</ul>
<p>
The following sites mirror the mSQL 2.<i>x</i> software distribution:
<ul>
<li> <a href="ftp://ftp.worldone.com/pub/msql">
ftp://ftp.worldone.com/pub/msql</a> <p>
Thanks to WorldOne <a href="http://www.worldone.com">
http://www.worldone.com</a>. <p>
<li> <a href="ftp://ftp.nerosworld.com/pub/msql/msql2">
ftp://ftp.nerosworld.com/pub/msql/msql2</a> <p>
Thanks to David Perry <a href="mailto:deperry@nerosworld.com">
<deperry@nerosworld.com></a>. <p>
<li> <a href="http://cal038031.student.utwente.nl/~mSQL">
http://cal038031.student.utwente.nl/~mSQL</a> or
<a href="ftp://cal038031.student.utwente.nl/pub/mSQL">
ftp://cal038031.student.utwente.nl/pub/mSQL</a> <p>
Thanks to Sjoerd de Heer
<a href="mailto:sjoerd@cal038031.student.utwente.nl">
<sjoerd@cal038031.student.utwente.nl></a>. <p>
<li>
<a href="ftp://sunsite.srce.hr/mirrors/bond.edu.au/pub/Minerva/msql/msql2">
ftp://sunsite.srce.hr/mirrors/bond.edu.au/pub/Minerva/msql/msql2</a>
<p>
Thanks to Davorin Bengez
<a href="mailto:Davorin.Bengez@sunsite.srce.hr">
<Davorin.Bengez@sunsite.srce.hr></a>.
</ul>
The following sites have a complete mirror of
<a href="http://hughes.com.au">http://hughes.com.au</a>: <p>
<ul>
<li>
<a href="http://hermes.nerosworld.com/msql">
http://hermes.nerosworld.com/msql</a> <p>
Thanks to David Perry <a href="mailto:deperry@nerosworld.com">
<deperry@nerosworld.com></a>.
</ul>
<p>
<hr>
<h3><a name="current-version">What is the latest version?</a></h3>
At the time of compiling this FAQ, the latest released version was
1.0.16. <p>
It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/msql-1.0.16.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/msql-1.0.16.tar.gz</a>
(195705 bytes)
</pre>
<hr>
<h3><a name="next-version">When will the next version be
released?</a></h3>
David has suspended all development work on mSQL version 1.<i>x</i> and
is concentrating his efforts on version 2.<i>x</i>. However, he will
continue to provide any necessary bug fixes for the current release of
mSQL. <p>
mSQL development is NOT David's primary role. He does this work in
whatever spare time he has available so PLEASE don't pester him with
requests about when we can expect future releases. Take the zen
approach and just let it happen :) <p>
A beta snapshot of mSQL version 2.0.<i>x</i> was released on May 8
1997. It is available from: <p>
<pre>
<a href="http://hughes.com.au/software/msql2/msql-2.0-B7.1.tar.gz">http://hughes.com.au/software/msql2/msql-2.0-B7.1.tar.gz</a>
(373261 bytes)
</pre>
<b>Note:</b> Do NOT download the mSQL-2.0B7.0 distribution. If you do
so you will not be able to compile the Lite modules. Use the
mSQL-2.0B7.1 distribution instead. <p>
It is also mirrored at a number of other sites. See the section above
titled "<a href="#mirrors">Are there any mirror sites for
mSQL?</a>" for details on these mirror sites. <p>
More details on mSQL 2.0.<i>x</i> can be found by visiting the Hughes
Technologies web pages at
<a href="http://hughes.com.au">http://hughes.com.au</a>. <p>
<hr>
<h3><a name="beta-software">What is Beta-release software?</a></h3>
Bambi is very interested in making mSQL work as well as possible for as
many people as possible. To make that happen quickly, Bambi has released
versions of mSQL which are not fully tested, with the hope that people
will try them under more circumstances than he could ever have the
time or equipment to do himself. <p>
This means, however, that this Beta software <b>MAY NOT WORK
CORRECTLY</b> for you. If you cannot tolerate hangs, crashes, or loss
of data, you should use the <a href="#current-version">latest released
version</a> and any <a href="#recommended-patches"> recommended
patches</a> (currently mSQL version 1.0.16 with the "lost table
patch"). However, if you can use the new version, please do so and
report bugs to the <a href="#mailing-list">mailing list</a> and to the
<a href="#reporting-bugs">bugs list</a> so they can be fixed in the
next release. <p>
<hr>
<h3><a name="why-bambi">Why is David called Bambi?</a></h3>
Bambi is a nickname that David acquired quite a long time ago. He
claims there are no derogatory implications associated with the name.
If you'd like to find out more send him some mail at
<a href="mailto:bambi@hughes.com.au"><bambi@hughes.com.au></a>.
<p>
<hr>
<h3><a name="prepared">How is this FAQ prepared?</a></h3>
The FAQ is written in HTML and proofread using version 3.01Gold of the
Netscape Navigator running under Solaris 2.5.1. The HTML syntax is
checked using version 1.017 of Neil Bowers'
<a href="mailto:neilb@khoral.com"><neilb@khoral.com></a> weblint
package. Text versions of the FAQ are created by saving the document as
a text file from within the Netscape Navigator. <p>
(See <a href="http://www.cre.canon.co.uk/~neilb/weblint.html">
http://www.cre.canon.co.uk/~neilb/weblint.html</a> for more details on
weblint). <p>
<hr>
<h3><a name="helping-hand">How can I contribute to the FAQ?</a></h3>
If you find any errors or omissions in the FAQ, <b>please</b> contact
me, Peter Samuel <a href="mailto:Peter.Samuel@uniq.com.au">
<Peter.Samuel@uniq.com.au></a>. I will be happy to correct any
errors or add elements to the FAQ. <p>
If you want something added to the FAQ, it would be a great help if you
could write a section and forward it to me - then I can simply insert
it in the appropriate location. <p>
Remember, I don't own the FAQ - I'm just its caretaker on your behalf.
<p>
<hr>
<hr width="75%">
<center>
<h2><a name="help-and-support">Help and Support</a></h2>
</center>
<h3><a name="recommended-patches">Are there any recommended patches to
the latest version?</a></h3>
There are no official patches to any release of mSQL. If modifications
need to be made, a new version of mSQL will be released. <p>
The above not withstanding there is one unofficial patch that should
be applied to mSQL version 1.0.16. <p>
<a name="p1">This</a> patch comes from David Hughes
<a href="mailto:bambi@hughes.com.au"><bambi@hughes.com.au></a>
and fixes the very old and very obscure problem of the occasionally
disappearing table. <p>
David writes:
<pre>
After sitting here banging my head against the old "missing table"
bug with my partner in crime Jason <a href="mailto:jason@fan.net.au"> <jason@fan.net.au></a> , we've fixed
it !!!!! This is yet another very obscure bug. So, can it be
reproduced? Yup, once you know the problem.
o Fill the table cache
o Cause a reference to a table that doesn't exist
o The oldest cache entry will have the table definition list
set to NULL but with the name, DB, and age fields still set
We all owe a debt of thanks to Jason as it was his inability to type
table names correctly that found the problem :)
</pre>
<pre>
*** ./src/msql/msqldb.c.orig Sun Jul 7 16:47:09 1996
--- ./src/msql/msqldb.c Tue Jul 30 17:07:42 1996
***************
*** 1398,1403 ****
--- 1398,1406 ----
safeFree(entry->rowBuf);
safeFree(entry->keyBuf);
entry->def = NULL;
+ *(entry->DB) = 0;
+ *(entry->table) = 0;
+ entry->age = 0;
}
/*
</pre>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> this patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>). <p>
David assures us that this patch will be rolled into version 1.0.17. <p>
<hr>
<h3><a name="known-bugs">Are there any known bugs or problems with the
current release of mSQL?</a></h3>
Since the release of mSQL 1.0.12, several problems have been reported
to the <a href="#mailing-list">mSQL mailing list</a>. These are outlined
below. <p>
<ul>
<li> <b>Problems with table/field name lengths</b> <p>
The definition of
<tt><b><a href="#table-limits">NAME_LEN</a></b></tt> changed from
version 1.0.10 to 1.0.12. It now seems that 18 characters is the
maximum value for a table or field name. This problem exists in
mSQL versions 1.0.12 and above. <p>
David Hughes writes: <p>
<pre>
The reason it changed in 1.0.12 is because I had a couple of
field_name buffers that didn't have room for a trailing NULL. Now,
trying to fix that without altering the size of the struct implies
that you have to shorten the name of the field (to leave the
required room). I didn't want to force everyone out there to drop
and reload every database they have just because of a 1 byte buffer
over-run.
If this is a major problem for you then ....
o dump all your databases
o find the definition in question
o set it to a value you like
o rebuild everything
o reload everything
If you can work out what to change to get the extra field name
length then you know enough about what you are doing to do the rest
of what's required. I haven't provided a step-by-step because if
people can't find the value they have to change I'm sure they'd
still end up asking the list about this stuff after breaking
things.
</pre>
At present there is NO patch to fix this problem. Possible
workarounds are David's method outlined above or to downgrade to
version 1.0.10. <p>
<li> The regular expression code in version 1.0.14 and above has
been cleaned up with the unfortunate side affect of making it
impossible to search for the special characters <tt>^</tt> and
<tt>\</tt>. <p>
The cleanup also changes the way in which other special characters
can be searched. The tables in the section
<a href="#escape-chars">"What other characters need
special treatment?"</a> outline the differences for versions
up to and including version 1.0.13 and 1.0.14 and above. <p>
<li> There are still isolated reports of <tt>msqld</tt> crashing
with SIGSEGV (segmentation violation) errors under Linux. These
occurrences have diminished but have not disappeared. There has
been one report that the problem lies not within mSQL or Linux but
in the hardware in use. An upgrade of the hardware may eliminate
the SIGSEGV conditions. For more non mSQL specific details on this
problem see: <p>
<pre>
<a href="http://www.bitwizard.nl/sig11">http://www.bitwizard.nl/sig11</a>
</pre>
<li> Some users have reported the <tt>msqld</tt> consumes large
amounts of memory when doing ORDERed selects: <p>
Marty Picco writes:
<pre>
I have a 200K+ record database running on a p90 with 96MB memory.
I have noticed that the first SELECT I do on this database after
msqld is started causes msqld to grab as much memory as it can...in
this case about 68MB. It appears that the memory is never released
until the daemon is restarted. Indeed, the SELECT does have an
ORDER clause.
</pre>
David has said that he'll investigate this problem. <p>
<li> There are still isolated reports of mSQL behaving strangely
under HP-UX 9.<i>x</i>. Any strangeness is more than likely a
symptom of a broken <tt>mmap()</tt> implementation. Try
compiling mSQL without <tt>mmap()</tt> support by editing <p>
<pre>
./targets/<i>your-architecture</i>/site.mm
</pre>
and ensuring the <tt>mmap()</tt> directive reads: <p>
<pre>
MMAP=
</pre>
and then compile and re-install the mSQL package.
</ul>
<p>
<hr>
<h3><a name="version2">What are the current problems with mSQL
2.0B<i>x</i>?</a></h3>
<b>Note:</b> This section is temporary. It will be merged into the
rest of the FAQ as mSQL 2.<i>x</i> matures. <p>
<b>Note:</b> Some parts of this section have been compiled by Lloyd
Parkes <a href="mailto:Lloyd.Parkes@vuw.ac.nz">
<Lloyd.Parkes@vuw.ac.nz></a>. <p>
There are a few known problems with the current release of mSQL
2.0B<i>x</i>. This list is undoubtedly incomplete and will probably
remain so because of the "moving target" nature of new
software. <p>
<ul>
<li> mSQL 2.<i>x</i> requires a fully functioning <tt>mmap()</tt>.
If your operating system does not support <tt>mmap()</tt> then you
can't use mSQL 2.<i>x</i>. The following operating systems are
known to provide insufficient <tt>mmap()</tt> support: <p>
<ul>
<li> NeXT <p>
<li> Linux - kernel 1.2.<i>x</i> and below. (Linux
1.3.<i>x</i> and above should be fine). <p>
<li> A/UX 3.1.1 <p>
<li> DEC Ultrix <p>
<li> MachTen <p>
<li> UNICOS (Cray research)
</ul>
<p>
<li> There are some new keywords which cannot be used as table or
field names. See the table in the section <a href="#reserved-words">
"Can I use mSQL reserved words as field or table
names?"</a> below. <p>
<li> The internal format of the database files has changed
significantly. If you wish to use mSQL 1.<i>x</i> databases with
mSQL 2.<i>x</i> you must reload them. The following procedure
should be followed: <p>
<ol>
<li> Using mSQL 1.<i>x</i>, dump your database with
<tt>msqldump</tt>: <p>
<pre>
msqldump -h <i>dbhost</i> -c <i>dbname</i> > db.dump
</pre>
<li> Edit <tt>db.dump</tt> and change ALL occurrences of
<tt>PRIMARY KEY</tt> definitions to <tt>INDEX</tt>. <p>
<li> Edit <tt>db.dump</tt> and change ALL occurrences of mSQL
keywords used as table or fields names. <p>
<li> Using mSQL 2.<i>x</i>, reload your database with
<tt>msql</tt>: <p>
<pre>
msql -h <i>dbhost</i> <i>dbname</i> < db.dump
</pre>
</ol>
Vivek Khera <a href="mailto:khera@kci.kciLink.com">
<khera@kci.kciLink.com></a> has provided the following Perl
program that will help you convert your mSQL 1.<i>x</i> dumps to
the mSQL 2.<i>x</i> format: <p>
<pre>
<font size="-1">
#! /usr/local/bin/perl
use strict;
# read a msql 1.x dump and convert PRIMARY KEY entries to UNIQUE INDEX
# called pkey for that table.
#
# also converts fields named time->timestamp, date->datestamp, count->counter
# V. Khera (vivek@khera.org) 08-JAN-1996
# Usage: msqldumpconvert orig.dumpfile > new.dumpfile
# or use it in a pipeline between msqldump from 1.x and msql from 2.x
my($field, $table);
while (<>) {
if (m/^\# mSQL Dump/) {
print "# mSQL Dump converted to mSQL 2.0 format\n";
} elsif (m/^\s+ (\w+).*PRIMARY KEY,/) {
$field = $1;
s/ PRIMARY KEY//;
print;
} elsif (m/CREATE TABLE (\w+)/) {
$table = $1;
$field = ""; # no field means no primary key
print;
} elsif (m/^\) \\g/ and $field) {
print;
print "\nCREATE UNIQUE INDEX pkey ON $table ($field)\\g\n\n";
} elsif (m/^ count /) {
s/^ count / counter /;
print;
print STDERR "Converted field 'count' to 'counter' in table $table\n";
} elsif (m/^ time /) {
s/^ time / timestamp /;
print;
print STDERR "Converted field 'time' to 'timestamp' in table $table\n";
} elsif (m/^ date /) {
s/^ date / datestamp /;
print;
print STDERR "Converted field 'date' to 'datestamp' in table $table\n";
} else {
print;
}
}
</font>
</pre>
<li> The mSQL 2.<i>x</i> API has some new functionality. You MUST
re-link all your third party applications with the new API. This
should be generally successful as the new API is a superset of the
mSQL 1.<i>x</i> API. <p>
<b>Note:</b> Simply relinking will NOT make the new functionality
available - the third party application must take advantage of the
new functions for you to make use of them. Relinking will only
enable you to use your existing third party applications with the
mSQL 2.<i>x</i> database server. <p>
<li> mSQL 2.<i>x</i> uses a different protocol than version
1.<i>x</i>. The tools provided with mSQL version 1.<i>x</i>, such
as <tt>msql</tt>, <tt>msqladmin</tt>, <tt>relshow</tt>, etc will
not work with mSQL version 2.<i>x</i>. You MUST use the tools
provided with the version 2.<i>x</i> distribution. <p>
<li> You cannot perform regular expression searches on
<tt>TEXT</tt> fields. <p>
David Hughes writes: <p>
<pre>
TEXT fields will always be slower than CHAR fields because the data
is split over multiple buffers. As for the searching you can do
anything other than *LIKE testing at the moment. I'll try to work
out a way to do LIKE and CLIKE on TEXT fields. RLIKE is a
non-option.
</pre>
<li> mSQL 2.0B5 uses a different database format than previous
2.<i>x</i> releases. This change was made to accommodate 64 bit
aligned data for machines running 64 pit processors such as the
DEC Alpha. If you are upgrading from a previous 2.<i>x</i> release
to 2.0B5 or beyond, you must dump your databases and reload them
using the following procedure: <p>
<ol>
<li> Use <tt>msqldump</tt> from the mSQL version
2.<i>x</i> release you are currently using to dump your
databases: <p>
<pre>
msqldump -h <i>dbhost</i> -c <i>dbname</i> > db.dump
</pre>
<li> Drop the old database using <tt>msqladmin</tt> from
the mSQL version 2.<i>x</i> release you are currently using
to dump your databases: <p>
<pre>
msqladmin drop <i>dbname</i>
</pre>
<li> Remove the old version of mSQL 2.<i>x</i> and install
the new version which should be mSQL version 2.0B5 or
above. <p>
<li> Create the new database using <tt>msqladmin</tt> from
mSQL version 2.0B5: <p>
<pre>
msqladmin create <i>dbname</i>
</pre>
<li> Use the <tt>msql</tt> monitor from mSQL 2.0B5 to
reload the dumped data: <p>
<pre>
msql -h <i>dbhost</i> <i>dbname</i> < db.dump
</pre>
</ol>
<li> <tt>msqlimport</tt> has a number of problems. <p>
<ul>
<li> Empty fields in the input are not parsed as NULL fields,
or anything else for that matter.
<li> There seems to be a problem with memory being trashed.
<li> Lossage when a delimiter longer than one character is
specified.
</ul>
<p>
A patch is available from <a href="http://www.vuw.ac.nz/~lloyd/msql">
http://www.vuw.ac.nz/~lloyd/msql</a>. <p>
<li> <tt>msqldump</tt> has trouble dumping the new <tt>DATE</tt>
type fields. It doesn't surround them with single quotes. This
patch from Andreas Wadephul
<a href="mailto:wadib@uhura.asfh-berlin.de">
<wadib@uhura.asfh-berlin.de></a> will fix this problem: <p>
<pre>
<font size="-1">
*** src/msql/msqldump.c.orig Tue Mar 25 09:49:57 1997
--- src/msql/msqldump.c Tue Mar 25 09:50:57 1997
***************
*** 346,352 ****
if (row[i])
{
if (field->type == CHAR_TYPE ||
! field->type == TEXT_TYPE)
{
tmp = escapeText(row[i]);
printf("\'%s\'", tmp);
--- 346,353 ----
if (row[i])
{
if (field->type == CHAR_TYPE ||
! field->type == TEXT_TYPE ||
! field->type == DATE_TYPE)
{
tmp = escapeText(row[i]);
printf("\'%s\'", tmp);
</font>
</pre>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> this patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>). <p>
<li> Heikki Vatiainen <a href="mailto:hessu@cs.tut.fi">
<hessu@cs.tut.fi></a> has found a problem where the server
(or client?) gets very confused with <tt>INSERT</tt> queries that
have large amounts of data. <p>
More details are available from
<a href="http://www.vuw.ac.nz/~lloyd/msql">
http://www.vuw.ac.nz/~lloyd/msql</a>. <p>
<li> Various errors with the bookmarks sample application. <p>
<li> Eric Huss <a href="mailto:e-huss@uiuc.edu">
<e-huss@uiuc.edu></a> reports there seems to be some
inconsistencies in the behaviour of the mSQL API calls
<tt>msqlListFields()</tt> and <tt>msqlListIndex()</tt>. When
passing a table name to <tt>msqlListFields()</tt>, if there is a
newline character at the end of the table name, there is no
problem. However, when passing a table name to
<tt>msqlListIndex()</tt>, and the table name has a newline
character at the end, then it doesn't work. This is due to the fact
that msql is using <tt>strok(NULL,"\n\r")</tt> to chop up the
arguments, and the extra newline in the middle causes problems. <p>
<li> Brendan Quinn <a href="mailto:brendan@nexus.sofcom.com.au">
<brendan@nexus.sofcom.com.au></a> reports a problem with
regular expression searches. <p>
Brendan writes: <p>
<pre>
If you have a field that is full and you do a like/clike search
where the last character of the like string matches the last
character of the field, mSQL-2.0 b3 and 4 (at least) incorrectly
match.
Example
-------
mSQL > create table blah ( Organisation CHAR(50) ) \g
Query OK. 1 row(s) modified or retrieved.
mSQL > insert into blah Values ('1995 Hopman Cup Tennis Tournament, Perth
Western A') \g
Query OK. 1 row(s) modified or retrieved.
mSQL > select * from blah where Organisation clike '%abababa%' \g
Query OK. 1 row(s) modified or retrieved.
+----------------------------------------------------+
| Organisation |
+----------------------------------------------------+
| 1995 Hopman Cup Tennis Tournament, Perth Western A |
+----------------------------------------------------+
which of course is wrong.
</pre>
Brendan also supplies a patch for this problem: <p>
<pre>
<font size="-1">
*** src/msql/types.c.orig Fri Apr 11 08:58:30 1997
--- src/msql/types.c Tue Apr 15 16:53:00 1997
***************
*** 138,144 ****
{
if (*cp1 == *cp2)
{
! if(likeTest(cp1,cp2,length-count)==1)
{
return(1);
}
--- 138,144 ----
{
if (*cp1 == *cp2)
{
! if(likeTest(cp1,cp2,length-count+1)==1)
{
return(1);
}
***************
*** 224,230 ****
{
if (toupper(*cp1) == toupper(*cp2))
{
! if(cLikeTest(cp1,cp2,length-count)==1)
{
return(1);
}
--- 224,230 ----
{
if (toupper(*cp1) == toupper(*cp2))
{
! if(cLikeTest(cp1,cp2,length-count+1)==1)
{
return(1);
}
</font>
</pre>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> this patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>). <p>
<li> Robert Sum <a href="mailto:sumrn@crd.ge.com">
<sumrn@crd.ge.com></a> reports on a number of
problems with pattern matching in mSQL version 2.0B<i>x</i>.
He has provided patches for these problems. The patches are
available via anonymous ftp from: <p>
<pre>
<a href="ftp://ce-toolkit.crd.ge.com/pub/sumrn/msql-2.0-B7/src/msql">ftp://ce-toolkit.crd.ge.com/pub/sumrn/msql-2.0-B7/src/msql</a>
</pre>
<li> mSQL version 2.0B7.1 has a problem with unique indices.
Dennis Doherty <a href="mailto:djd@atrieva.com">
<djd@atrieva.com></a> has supplied the following patch: <p>
<pre>
*** src/msql/index.c.orig Tue Jun 24 10:26:54 1997
--- src/msql/index.c Tue Jun 24 10:27:29 1997
***************
*** 353,359 ****
if (node)
{
curRow = (u_int)node->data;
! if (curRow != rowNum && rowNum != NO_POS)
return(0);
}
return(1);
--- 353,359 ----
if (node)
{
curRow = (u_int)node->data;
! if (curRow != rowNum || rowNum == NO_POS)
return(0);
}
return(1);
</pre>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> this patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>).
</ul>
<hr>
<h3><a name="other-patches">Are there any other patches
available?</a></h3>
This FAQ only details those
<a href="#recommended-patches">recommended patches</a> that are
necessary for the general operation of mSQL. There are a number of
other user contributed patches that enhance the operation of mSQL.
Some of these patches are available via anonymous ftp while others are
available from the mSQL mailing list
<a href="#list-archives">archives</a>. <p>
Some of these patches are for older releases of mSQL. They may have
been rolled into subsequent releases of mSQL or they may not work with
later releases of mSQL or they may break the successful operation of
later releases of mSQL. Use them at your own risk. <p>
A brief and no doubt incomplete list of these patches follows: <p>
<ul>
<li> <a name="insert-patch">When</a> you insert a NULL as a primary
key integer field, mSQL chooses a unique sequence number.
Contributed by Jens-Peter Haack
<a href="mailto:peter@netcs.com"><peter@netcs.com></a> <p>
Available from: <p>
<pre>
<a href="ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/patches/insert.msql-1.0.9">ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/patches/insert.msql-1.0.9</a>
(593 bytes)
</pre>
<li> Mathematical updates. You can use statements like: <p>
<pre>
update account set balance = balance + 100 where nr = 12345;
</pre>
Contributed by Michael Koehne
<a href="mailto:kraehe@bakunin.north.de">
<kraehe@bakunin.north.de></a>. <p>
Available from: <p>
<pre>
<a href="ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/patches/update.msql-1.0.9">ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/patches/update.msql-1.0.9</a>
(12677 bytes)
</pre>
<li> You can now use double quotes where quotes are allowed.
Contributed by Michael Koehne
<a href="mailto:kraehe@bakunin.north.de">
<kraehe@bakunin.north.de></a>. <p>
Available from: <p>
<pre>
<a href="ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/patches/quote.msql-1.0.9">ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/patches/quote.msql-1.0.9</a>
(1225 bytes)
</pre>
<li> Michael Koehne <a href="mailto:kraehe@bakunin.north.de">
<kraehe@bakunin.north.de></a> has bundled his value added
patches to mSQL, which include the two mentioned above as well as
some others. <p>
Michael writes: <p>
<pre>
This patch includes the following features :
- Usage of double quotes for strings. I know this is not ISO
but a lot of other databases also allow double quotes and
some of my programs use double quotes.
- Speedup of regular expression.
- Simple expressions in update.
- auto primary key insert.
- Some bug fixes.
</pre>
They are available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/features-msql-1.0.16">ftp://ftp.uni-bremen.de/pub/unix/database/Minerva/features-msql-1.0.16</a>
(19297 bytes)
</pre>
or
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLpatches/features.msql-1.0.16">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLpatches/features.msql-1.0.16</a>
(19297 bytes)
</pre>
<li> Case insensitive searching. You can use statements like: <p>
<pre>
select name from table where name ilike 'Manu%'
</pre>
Contributed by Benjamin Jacquard
<a href="mailto:jacquard@lix.polytechnique.fr">
<jacquard@lix.polytechnique.fr></a>. <p>
The patch is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.geo.tu-freiberg.de/pub/unix/msql/case-insensitive.patch">ftp://ftp.geo.tu-freiberg.de/pub/unix/msql/case-insensitive.patch</a>
(8265 bytes)
</pre>
<li> Martin Schulze
<a href="mailto:joey@finlandia.Infodrom.North.DE">
<joey@finlandia.Infodrom.North.DE></a> has modified
<tt>msqldump</tt> to let it insert or remove fields while dumping.
Using this patch fixes the problem where the table definition
cannot be modified after filling it with data. <p>
The patch is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.infodrom.north.de/pub/mirror/msql/Patches/msqldump-1.0.16">ftp://ftp.infodrom.north.de/pub/mirror/msql/Patches/msqldump-1.0.16</a>
(5275 bytes)
</pre>
<li> Denis Ballant <a href="mailto:brdbb@brus.wec.com">
<brdbb@brus.wec.com></a> has rewritten the <tt>acl.c</tt>
file from the mSQL distribution so that it will accept the wild card
characters * and ? anywhere within an entry. Details of this patch
are available from the mSQL mailing list
<a href="#list-archives">archives</a> for the month of August
1996. <p>
<li> Robert Sum <a href="mailto:sumrn@crd.ge.com">
<sumrn@crd.ge.com></a> has a patch for mSQL
version 1.0.16 that will restore the <tt>LIKE</tt> operation to its
former glory - that is you can now search for the characters
<tt>\</tt> and <tt>^</tt>. <p>
Robert writes:
<pre>
1. Adjusted the deletion of backslashes during the mSQL to regexp
translator code to make treatment of special characters more
uniform. In other words, all regexp special characters except
backslash require only two backslashes in front of them to be
treated normally. (One is stripped by msql or the translator;
the second by the regexp package.) The backslash character
requires four backslashes because it is the escape character
for both the msql monitor and the regexp package. The single
quote, of course, remains the same needing only one backslash
because it is special only to mSQL.
So, you can all now search for \ and ^ and everything else. Or
so my ever expanding test set tells me.
2. The execution of some of the non-LIKE comparison code by the
NOT LIKE operator is fixed. (This should probably be a
miniscule performance increase--except that it might be eaten
by 1.)
</pre>
<pre>
<font size="-1">
*** src/msql/msqldb.c 1996/11/04 23:13:54 1.1
--- src/msql/msqldb.c 1996/11/05 01:02:01 1.2
***************
*** 3164,3176 ****
switch(*cp1)
{
case '\\':
! if (*(cp1+1) == '%' || *(cp1+1) == '_')
! {
! cp1++;
! *cp2 = *cp1;
}
- cp1++;
- cp2++;
break;
case '_':
--- 3164,3209 ----
switch(*cp1)
{
case '\\':
! /* RNS: The only time that we really want to
! drop backslashes is when they are escaping
! either % or _.
! */
! if (!*(cp1+1)) {
!
! /* keep backslash at the end of an expr. */
! *cp2 = *cp1;
! *cp1++; *cp2++;
!
! } else {
!
! if ((*(cp1+1) == '%') || (*(cp1+1) == '_')) {
!
! /* drop backslash when followed by
! % or _.
! */
! cp1++;
! *cp2 = *cp1;
! cp1++; cp2++;
!
! } else if (*(cp1+1) == '\\') {
!
! /* keep both backslashes when they escape
! themselves
! */
! *cp2 = *cp1;
! *cp1++; *cp2++;
! *cp2 = *cp1;
! *cp1++; *cp2++;
!
! } else {
!
! /* keep the backslash so it can escape
! some other regexp character.
! */
! *cp2 = *cp1;
! *cp1++; *cp2++;
! }
}
break;
case '_':
***************
*** 3351,3357 ****
REG char *c1,*c2;
REG int offset;
! if (op != LIKE_OP)
{
c1 = v1;
c2 = v2;
--- 3384,3394 ----
REG char *c1,*c2;
REG int offset;
! if ((op == LIKE_OP) || (op == NOT_LIKE_OP))
! {
! cmp = regexpTest( v1, v2, maxLen );
! }
! else
{
c1 = v1;
c2 = v2;
***************
*** 3395,3405 ****
break;
case LIKE_OP:
! result = regexpTest(v1,v2,maxLen);
break;
case NOT_LIKE_OP:
! result = !(regexpTest(v1,v2,maxLen));
break;
}
return(result);
--- 3432,3442 ----
break;
case LIKE_OP:
! result = cmp;
break;
case NOT_LIKE_OP:
! result = !cmp;
break;
}
return(result);
</font>
</pre>
<li> Vivek Khera <a href="mailto:khera@kci.kciLink.com">
<khera@kci.kciLink.com></a> has a patch for increasing the
number of connections that can be queued by <tt>msqld</tt>. The
patch is available from the mSQL mailing list
<a href="#list-archives">archives</a> for the month of December 1996.
<p>
<li> Sascha Kettler
<a href="mailto:kettler@rummelplatz.uni-mannheim.de">
<kettler@rummelplatz.uni-mannheim.de></a> has patched mSQL
version 1.0.16 such that it supports the Secure Sockets Layer -
SSL - protocol. The patch is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLSSL/msql-1.0.16-patch.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLSSL/msql-1.0.16-patch.tar.gz</a>
(7183 bytes)
</pre>
<li> Etienne Klein <a href="mailto:etienne@lca.u-nancy.fr">
<etienne@lca.u-nancy.fr></a> has provided an <tt>mmap()</tt>
substitute for NeXTSTEP systems. This code was developed by Fabien
Roy <a href="mailto:Fabien_Roy@free.fdn.fr">
<Fabien_Roy@free.fdn.fr></a> and Robert Ehrlich
<a href="mailto:Robert.Ehrlich@inria.fr">
<Robert.Ehrlich@inria.fr></a>. It is presented here in full.
<p>
Etienne writes: <p>
<pre>
I just want to share this little patch which solve the mmap problem
for NeXTSTEP. It apparently works (meaning all msql tests are OK)
for:
NSFIP 3.3 p1
NS Motorola 3.3 p1.
It does NOT work for HP 3.2
All other configurations are untested !
Thanks to the authors Fabien Roy and Robert Ehrlich for this patch !
Etienne Klein
Laboratoire de Chimie Analytique
Faculte de Pharmacie de Nancy
France
</pre>
<pre>
<font size="-1">
/*
* @(#)map.c 1.0 of 20 December 1996
*
* Copyright (c) 1996 by Fabien Roy.
* Written by Fabien Roy and Robert Ehrlich.
* Fabien_Roy@free.fdn.fr Robert.Ehrlich@inria.fr
* Not derived from licensed software.
*
* Permission is granted to anyone to use this software for any
* purpose on any computer system, and to redistribute it freely,
* subject to the following restrictions:
*
* 1. The author is not responsible for the consequences of use of
* this software, no matter how awful, even if they arise
* from defects in it.
*
* 2. The origin of this software must not be misrepresented, either
* by explicit claim or by omission.
*
* 3. Altered versions must be plainly marked as such, and must not
* be misrepresented as being the original software.
*
*/
#include <sys/types.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <syscall.h>
caddr_t
mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
{
int pagelessone = getpagesize() -1;
int size;
caddr_t pageaddress;
/* round to next page size */
size = (len + pagelessone) & ~pagelessone;
/* allocate aligned pages */
if (!(pageaddress = (caddr_t) valloc(size)))
return (caddr_t) -1;
/* map it */
if (syscall(SYS_mmap, pageaddress, size, prot,
flags, fd, off)){
free(pageaddress);
return (caddr_t) -1;
}
return pageaddress;
}
void
munmap(caddr_t addr, size_t len)
{
syscall(SYS_munmap,addr,len);
free(addr);
}
</font>
</pre>
</ul>
<hr>
<h3><a name="how-to-patch">How do I apply patches to the mSQL
source?</a></h3>
Patches are distributed as context based difference listings. That is
the line by line differences between the original file and the new file
are listed with surrounding lines of code to provide some context
information. They are usually <a href="#contrib-patches">generated</a>
by using a program such as <tt>diff</tt>. <p>
The easiest way to apply these patches is to use Larry Wall's
<tt>patch</tt> program: <p>
<pre>
<i>Patch</i> will take a patch file containing any of the four forms of
difference listing produced by the <i>diff</i> program and apply those
differences to an original file, producing a patched version. By
default, the patched version is put in place of the original, with
the original file backed up to the same name with the extension
".orig".
</pre>
<tt>Patch</tt> is available from a number of anonymous ftp sites
worldwide. Latest versions of <tt>patch</tt> are being distributed by
the Free Software Foundation as part of the GNU suite of products. <p>
If you're having difficulty finding the latest version of
<tt>patch</tt>, you can download version 2.1 via anonymous ftp from:
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Misc/patch-2.1.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Misc/patch-2.1.tar.gz</a>
(74856 bytes)
</pre>
While some patches are fairly simple - often involving minor changes
to a single line of code - others are quite complex and attempting to
apply these patches by hand is definitely NOT recommended. Use the
<tt>patch</tt> program whenever you need to apply a patch. <p>
To apply the <a href="#recommended-patches">patches listed in this
FAQ</a>, use this procedure:
<ol>
<li> Save the patch to a file - say <tt>/tmp/msql-patch1</tt>.
Only save the patch information - the <tt>patch</tt> program can
usually determine which parts of the file are patches and which
parts are not but its easier for you to strip out any unnecessary
information before running <tt>patch</tt>. <p>
You should be left with a file containing a number of sections
similar to: <p>
<pre>
*** ./src/msql/net.c.orig Tue Oct 17 11:24:03 1995
--- ./src/msql/net.c Tue Dec 12 15:24:11 1995
***************
*** 66,72 ****
! void writePkt(fd)
int fd;
{
u_char *cp;
--- 66,72 ----
! int writePkt(fd)
int fd;
{
u_char *cp;
</pre>
<li> Change directories to your mSQL source repository. For
example: <p>
<pre>
cd /usr/local/src/db/Minerva/msql/msql-1.0.16
</pre>
<li> Apply the patch as follows: <p>
<pre>
patch -l < /tmp/msql-patch1
</pre>
The "<tt>-l</tt>" option is used to tell <tt>patch</tt>
to ignore any whitespace mismatches between lines in the patch file
and lines in the mSQL source file. (<i>That's an "el",
NOT a "one" or an "eye"</i>). <p>
<tt>Patch</tt> will respond with output similar to: <p>
<pre>
Hmm... Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** ./src/msql/net.c.orig Tue Oct 17 11:24:03 1995
|--- ./src/msql/net.c Tue Dec 12 15:24:11 1995
--------------------------
Patching file ./src/msql/net.c using Plan A...
Hunk #1 succeeded at 66.
Hunk #2 succeeded at 84.
done
</pre>
If you have problems applying the patch, you may wish to consider
using some or all of the following arguments to patch: <p>
<ul>
<li><b>-b</b> <p>
forces <tt>patch</tt> to create a backup of the original file.
By default it adds a <i>.orig</i> suffix to the original
filename. <p>
<li><b>-N</b> <p>
forces <tt>patch</tt> to ignore patches that it thinks are
reversed or already applied. <p>
<li><b>-p0</b> (<i>That's a "zero", NOT an
"oh"</i>).<p>
forces <tt>patch</tt> to honour the full pathname of the files
listed in the patch file.
</ul>
<p>
<li> Recompile mSQL. If you have <a href="#other-apps">third party
applications</a> that use the mSQL library, you'll probably have to
<a href="#recompile">recompile</a> them as well.
</ol>
<hr>
<h3><a name="online-doco">Is online documentation available?</a></h3>
A set of WWW pages for mSQL, <a href="#w3-msql">W3-mSQL</a>,
<a href="#esl">ESL and Minerva</a> are now available
from <p>
<pre>
<a href="http://Hughes.com.au">http://Hughes.com.au</a>
</pre>
Jeff Rowe <a href="mailto:beowulf@cscsun4.larc.nasa.gov">
<beowulf@cscsun4.larc.nasa.gov></a> has converted the mSQL
documentation to HTML format. It is available from: <p>
<pre>
<a href="http://cscsun1.larc.nasa.gov/~beowulf/msql/msql.html">http://cscsun1.larc.nasa.gov/~beowulf/msql/msql.html</a>
</pre>
Tim Finin <a href="mailto:finin@umbc.edu"> <finin@umbc.edu></a>
has created an online mSQL tutorial. It is available from: <p>
<pre>
<a href="http://www.cs.umbc.edu/~finin/461/msql">http://www.cs.umbc.edu/~finin/461/msql</a>
</pre>
Mike Carpenter <a href="mailto:mikec@emi.net">
<mikec@emi.net></a> has begun to collate the available mSQL
documentation into a single site. He hopes to have a wide range of
resources available for value added mSQL products such as the Perl and
Java interfaces. His work can be found at: <p>
<pre>
<a href="http://www.emi.net/~mikec/tech/msql.html">http://www.emi.net/~mikec/tech/msql.html</a>
</pre>
<hr>
<h3><a name="mailing-list">Is there a mailing list for mSQL?</a></h3>
Yes. <p>
To subscribe to the list, send the word "<tt>subscribe</tt>"
in the body of your message to
<a href="mailto:msql-list-request@bunyip.com">
msql-list-request@bunyip.com.</a> <p>
To unsubscribe from the list send the word
"<tt>unsubscribe</tt>" in the body of your message to
<a href="mailto:msql-list-request@bunyip.com">
msql-list-request@bunyip.com.</a> <p>
Postings should be addressed to <a href="mailto:msql-list@bunyip.com">
msql-list@bunyip.com.</a> <p>
<a name="list-archives">Archives</a> of the mailing list are available
via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.bunyip.com/pub/mailing-lists/msql-list.archive/">ftp://ftp.bunyip.com/pub/mailing-lists/msql-list.archive/</a>
</pre>
Each month's archive is stored in a file: <p>
<pre>
msql-list.archive.YYMM
</pre>
where <tt>YYMM</tt> represents the year and month. So the archive for
October 1995 would be in the file: <p>
<pre>
msql-list.archive.9510
</pre>
These files are also available from the
<a href="http://www.math.psu.edu/barr/majordomo-faq.html">majordomo</a>
mailing list server at <a href="http://www.bunyip.com">bunyip.com</a>.
To receive a list of the archive files available as well as the
majordomo help file send a message to
<a href="mailto:majordomo@bunyip.com">majordomo@bunyip.com</a> with the
text: <p>
<pre>
index msql-list
help
END
</pre>
in the body of the message. <p>
To reach a human for help regarding the mailing list send a note to:
<p>
<pre>
<a href="mailto:owner-msql-list@bunyip.com">owner-msql-list@bunyip.com</a>
</pre>
or
<pre>
<a href="mailto:listmaster@bunyip.com">listmaster@bunyip.com</a>
</pre>
The mailing list discusses issues that arise from the use of mSQL and
W3-mSQL (both products developed by David Hughes). Often discussions on
contributed software arise but it is probably best to take these
discussions off line and summarise solutions back to the list. <p>
Traffic on the list is fairly high. There were approximately 1100
postings between April 1 1996 and May 31 1996 which gives an average of
around 550 messages per month. (If you think this is high, try
subscribing to the firewalls list - this has an average of around 1000
postings per month!) <p>
Turn around times for postings can sometimes be a little slow. It is
not unusual for messages sent from Australia to take a few hours to
appear on the list. List subscribers from other countries have also
reported similar turn around times. Please be patient. <p>
<hr>
<h3><a name="mailing-list-digest">Is there a mailing list digest for
mSQL?</a></h3>
Yes.
To subscribe to the list digest, send the words "<tt>subscribe
msql-list-digest</tt>" in the body of your message to
<a href="mailto:majordomo@bunyip.com">majordomo@bunyip.com</a>. <p>
To unsubscribe from the list digest send the words "<tt>unsubscribe
msql-list-digest</tt>" in the body of your message to
<a href="mailto:majordomo@bunyip.com">majordomo@bunyip.com</a>. <p>
<hr>
<h3><a name="html-mail">Are there any HTML archives of the mSQL mailing
list?</a></h3>
A number of sites have set up a web based archive of the mSQL mailing
list (among others). Their locations and features are summarised
below: <p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th>
Archive Location
</th>
<th>
Features
</th>
</tr>
<tr>
<td>
<a href="http://tacyon.spectrum.com.au/mail/msql">
http://tacyon.spectrum.com.au/mail/msql</a> <br>
(Thanks to Matt Perkins
<a href="mailto:matt@spectrum.com.au">
<matt@spectrum.com.au></a>).
</td>
<td>
Threaded archive, list archive, old list archives.
</td>
</tr>
<tr>
<td>
<a href="http://cure.medinfo.org/lists/programming/index.html">
http://cure.medinfo.org/lists/programming/index.html</a> <br>
(Thanks to the folks at Medinfo <a href="http://cure.medinfo.org">
http://cure.medinfo.org</a>).
</td>
<td>
Threaded archive, browse current month, search list
archive. <b>Currently Unavailable.</b>
</td>
</tr>
<tr>
<td>
<a href="http://www.nexial.nl/cgi-bin/msql">
http://www.nexial.nl/cgi-bin/msql</a> <br>
(Thanks to Kim Hendrikse <a href="mailto:kim@nexial.nl">
<kim@nexial.nl></a>).
</td>
<td>
Fuzzy searchable archive.
</td>
</tr>
<tr>
<td>
<a href="http://www.findmail.com/listsaver/msql-list">
http://www.findmail.com/listsaver/msql-list</a> <br>
(Thanks to FindMail Communications
<a href="http://www.findmail.com">
http://www.findmail.com</a>).
</td>
<td>
Listed by subject thread, date or author. Archives from
October 1995.
</td>
</tr>
</table>
</center>
<p>
<hr>
<h3><a name="news-group">Is there a news group for mSQL?</a></h3>
No. <p>
This question comes up about every three months or so - usually from
new subscribers to the <a href="#mailing-list">mSQL mailing list</a>
who haven't seen the previous threads. <p>
There seem to be two distinct groups of people involved in this
discussion: <p>
<ol>
<li> Those who prefer the mailing list. <p>
<ul>
<li> News turn around times can be horrendously slow. It
is not uncommon for messages to appear in Australia up to
seven (7) days after they were originally posted.
Considering that mSQL is developed and supported in
Australia, a news group would pose an unacceptable delay
in providing support for mSQL. <p>
<li> The mailing list is well established and even if a
news group were created, the mailing list would still
live on. Creation of a news group would mean that users
would need to track both forums in order to keep abreast
of current developments in mSQL. <p>
<li> Newsgroup messages expire - if you happen to be away
for an extended period you run the risk of losing valuable
information that may have expired while you were away. <p>
<li> News groups are often subject to "spamming"
whereas mailing lists are less vulnerable. <p>
<li> Signal to noise ratios on news groups tend to be
lower than mailing lists (even when instances of
"spamming" are discounted). <p>
<li> Not everyone who subscribes to the mSQL mailing list
has a news feed. Establishment of a news group would
immediately isolate those mSQL users from any discussions
carried out within the news group. <p>
<li> Not everyone has access to a full news feed. Some
people have difficulty in obtaining permission to receive
new news groups. Establishment of a news group would
immediately isolate those mSQL users from any discussions
carried out within the news group.
</ul>
<p>
<li> Those who would prefer a news group. <p>
<ul>
<li> A news group allows mSQL related messages to be
isolated from other messages. This can be resolved by
using mail filtering or threaded mail readers. Examples of
mail filtering include <tt>procmail</tt> and <tt>filter</tt>
(which is distributed with the Elm mail reader). Release
2.<i>x</i> and above of the Netscape Navigator includes a
threaded mail reader. <p>
<li> The volume of messages on the mSQL list is
increasing, making it difficult to keep track of threads.
This can be alleviated using the methods described above.
<p>
<li> It is often more cost effective for some users to
receive blocks of news rather than individual mail messages.
Similar behaviour can be achieved by subscribing to the
<a href="#mailing-list-digest">mSQL mailing list digest</a>.
</ul>
</ol>
While opinion is divided among these camps, the dominant force at
present is for the mailing list to continue without the establishment
of a global newsgroup. However, this does not preclude you from
setting up a local news/mail gateway such that incoming mail items are
sent to a local newsgroup at your site and outgoing news postings are
sent to the mailing list. Consult your <tt>nntp</tt> documentation for
more details. <p>
Nor does it preclude you from establishing a global news group. There
are well defined channels established within the Usenet community for
the creation of new news groups. <p>
One publicly available mail/news gateway is available via anonymous
ftp from:
<pre>
<a href="ftp://ftp.vix.com/pub/inn/contrib/newsgate.tar.Z">ftp://ftp.vix.com/pub/inn/contrib/newsgate.tar.Z</a>
(443025 bytes)
</pre>
It includes the programs <tt>mail2news</tt> and <tt>news2mail</tt>. <p>
<hr>
<h3><a name="posting">How do I post a question to the</a>
<a href="#mailing-list">mSQL mailing list?</a></h3>
Before you post a question to the mSQL mailing list, read the manual
that came with the mSQL distribution as well as the rest of this FAQ.
Also, ask yourself the following question: <p>
<pre>
Is there any way I can find the answer to this question myself?
</pre>
If you can figure out a way to simply find the answer, then it will
probably be quicker than asking the list. If you think your answer
would be helpful to others then post a summary to the mailing list.
<p>
Postings should be addressed to
<a href="mailto:msql-list@bunyip.com"> msql-list@bunyip.com.</a> <p>
<b><font size="+1">IF YOU POST A QUESTION TO THE LIST ASKING FOR HELP, YOU
MUST INCLUDE THE FOLLOWING INFORMATION! <p>
<ol>
<li> The operating system you are using - for example Solaris 2.4 or
Linux 1.3.1. On Unix like systems, this can usually be obtained by
running the command: <p>
<pre>
uname -a
</pre>
<li> The processor type - for example sparc, Intel 386, HP PA-RISC,
mc68020. Often the same operating system may run on different
processors. <p>
<li> The output of the command: <p>
<pre>
msqladmin version
</pre>
<li> Which, if any, unofficial patches you have applied to the
version of mSQL you're using. <p>
<li> The name and version details of any <a href="#other-apps">third
party application</a> you are using with mSQL.
</ol>
Failure to include these details makes it almost impossible to pinpoint
the cause of your problem.</font></b> <p>
<hr>
<h3><a name="current-bug">I've found a bug. How can I tell if it's been fixed
yet?</a></h3>
The status of the development is reflected in the HISTORY file. An
on-line copy of the HISTORY file is kept on the Hughes Technology web
pages. This file is updated as each modification is made to the
sources. Any bugs that have been fixed in the code since it was last
release will be mentioned in the on-line release history information.
You can access this file on the web as: <p>
<pre>
<a href="http://Hughes.com.au/product/msql/history.htm">http://Hughes.com.au/product/msql/history.htm</a>
</pre>
<hr>
<h3><a name="reporting-bugs">How do I report a bug in mSQL?</a></h3>
The first thing to remember is that you should NOT mail David Hughes
(aka Bambi) directly with your questions - this just makes the process
slower. Any questions you have should be sent to the
<a href="#mailing-list">mSQL mailing list</a>. <p>
If you want to report a bug, send a report to the mSQL bug reporting
address at
<a href="mailto:msql-bugs@hughes.com.au">msql-bugs@hughes.com.au.</a>
You may also wish to copy your report to the
<a href="#mailing-list">mSQL mailing list</a> at
<a href="mailto:msql-list@bunyip.com">msql-list@bunyip.com.</a> <p>
When making your bug report, please include the following information:
<p>
<ul>
<li> the operating system and version - for example Solaris 2.4 or
HP-UX 9.05
<li> the processor you are using - for example sparc or Intel 486
<li> include the output of "<tt>msqladmin version</tt>"
<li> which, if any, <a href="#recommended-patches">unofficial
patches</a> you have applied to the version of mSQL you're using
<li> include a dump of a test database using <tt>msqldump</tt>
<li> include an mSQL script that will show the bug
</ul>
You should also ensure that you are running the
<a href="#current-version">latest</a> (stable) version of mSQL before
posting a bug report as David fixes bugs in every version. <p>
<hr>
<h3><a name="contrib-patches">How do I contribute a patch to
mSQL?</a></h3>
Following this procedure will standardise the manner in which unofficial
mSQL patches are distributed to the mSQL user community. <p>
<ol>
<li> Ensure that you are patching the
<a href="#current-version">latest</a> version of mSQL. <p>
<li> Ensure that you have applied any necessary
<a href="#recommended-patches"> unofficial recommended patches</a> to
the latest version. <p>
<li> Make your changes to the "<tt>src</tt>" hierarchy of
mSQL. For example, if you need to patch the file: <p>
<pre>
msqld.c
</pre>
Save the original file as follows: <p>
<pre>
cp ./src/msql/msqld.c ./src/msql/msqld.c.orig
</pre>
Make your changes to the file: <p>
<pre>
./src/msql/msqld.c
</pre>
<li> Test, double test and triple test your patch to make sure it
<b>REALLY</b> fixes a problem. <p>
<li> Generate a difference listing suitable for use by Larry Wall's
<tt>patch</tt> program:
<pre>
diff -c ./src/msql/msqld.c.orig ./src/msql/msqld.c
</pre>
<li> Post this difference listing and an explanation of the patch to
the <a href="#mailing-list">mSQL mailing list</a>.
</ol>
If at all possible, try to avoid posting 'monster' patches. If your
patch modifies a number of separate aspects of mSQL, split each of these
into different patches. This makes it easier for people to apply
feature specific patches to mSQL while avoiding unwanted feature
patches. <p>
<hr>
<h3><a name="contrib-code">How do I contribute code to the mSQL
community?</a></h3>
Contributed code can be uploaded to the ftp server at
<a href="http://bond.edu.au">Bond University</a> Australia. Place your
code in the directory: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Incoming">ftp://bond.edu.au/pub/Minerva/msql/Incoming</a>
</pre>
then notify David at
<a href="mailto:bambi@hughes.com.au"><bambi@hughes.com.au></a>.
He will move your contribution to the mSQL
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib">contributions</a>
directory: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib">ftp://bond.edu.au/pub/Minerva/msql/Contrib</a>
</pre>
<b>Note:</b> The directory permissions for
<a href="ftp://bond.edu.au/pub/Minerva/msql/Incoming">
<tt>ftp://bond.edu.au/pub/Minerva/msql/Incoming</tt></a> prohibit the
viewing of any files contained therein. This is a security feature
implemented by the system administration staff at
<a href="http://bond.edu.au">Bond University</a> to eliminate recent
attempts to use the ftp server as a relay for the unauthorised transfer
of commercial software. If you upload any software to this directory,
you must notify
<a href="mailto:bambi@hughes.com.au"><bambi@hughes.com.au></a> to
have it moved to <a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib">
<tt>ftp://bond.edu.au/pub/Minerva/msql/Contrib</tt></a>. <p>
You may like to discuss your proposed code with others on the
<a href="#mailing-list">mSQL mailing list</a>. The subscribers to this
list may be able to help you with improvements or modifications to your
code or advise you of work already available in your area. <p>
<hr>
<h3><a name="code-examples">Where can I find examples of code that
interface with mSQL?</a></h3>
If you're writing code in the C programming language, examine the mSQL
distribution itself. All the auxiliary programs use the mSQL
<a href="#api">API</a> in a variety of ways. Pay particular attention
to: <p>
<ul>
<li> <a href="#support-progs"><tt>./src/msql/msql.c</tt></a>
<li> <a href="#support-progs"><tt>./src/msql/relshow.c</tt></a>
<li> <a href="#support-progs"><tt>./src/msql/msqldump.c</tt></a>
<li> <a href="#support-progs"><tt>./src/msql/msqladmin.c</tt></a>
</ul>
If you're writing code in other languages, have a look through the
distribution of the mSQL language extension itself for examples.
Another good place to look is the <a href="#list-archives">mSQL mailing
list archives</a>. <p>
<hr>
<h3><a name="porting">Are there any non Unix ports of mSQL?</a></h3>
Both mSQL version 1.<i>x</i> and 2.<i>x</i> have been ported to a few
other operating systems - namely MS Windows, MS Windows 95, MS Windows
NT and OS/2. For more details on these ports and any other ports,
please see the <a href="#other-apps">"Contributed Code and Third
Party Applications"</a> section of this FAQ. <p>
<hr>
<hr width="75%">
<!-- End of Part 1 -->
<center>
<h2><a name="features-and-limits">Features and Limitations</a></h2>
</center>
<h3><a name="support-progs">What support programs are bundled with
mSQL?</a></h3>
mSQL is bundled with the following programs: <p>
<center>
<table border=2 cellpadding=3 width="50%" bgcolor="#cccccc">
<tr>
<th colspan=2>Support Programs bundled with mSQL version
1.<i>x</i></th>
</tr>
<tr>
<td align=center><b>msqld</b></td>
<td>the mSQL database server.</td>
</tr>
<tr>
<td align=center><b>msqladmin</b></td>
<td>handles administrative details such as creation and
deletion of databases, server shutdown etc.</td>
</tr>
<tr>
<td align=center><b>msql</b></td>
<td>the mSQL monitor. It provides a user interface for making
SQL queries on databases.</td>
</tr>
<tr>
<td align=center><b>msqldump</b></td>
<td>Dumps a database in ASCII format. The dump takes the form
of SQL commands so that the entire database can be re-created
from the dump file.</td>
</tr>
<tr>
<td align=center><b>relshow</b></td>
<td>The mSQL schema viewer. Shows <a href="#schema">table
details</a> for a given database.</td>
</tr>
</table>
</center>
<p>
<center>
<table border=2 cellpadding=3 width="50%" bgcolor="#cccccc">
<tr>
<th colspan=2>Support Programs bundled with mSQL version
2.<i>x</i></th>
</tr>
<tr>
<td align=center><b>msql2d</b></td>
<td>the mSQL database server.</td>
</tr>
<tr>
<td align=center><b>msqladmin</b></td>
<td>handles administrative details such as creation
and deletion of databases, server shutdown etc.</td>
</tr>
<tr>
<td align=center><b>msql</b></td>
<td>the mSQL monitor. It provides a user interface
for making SQL queries on databases.</td>
</tr>
<tr>
<td align=center><b>msqldump</b></td>
<td>Dumps a database in ASCII format. The dump
takes the form of SQL commands so that the entire database can
be re-created from the dump file.</td>
</tr>
<tr>
<td align=center><b>msqlexport</b></td>
<td>Dumps a database in ASCII format. The dump
takes the form of user defined character delimited fields
suitable for importing into other vendor's databases.</td>
</tr>
<tr>
<td align=center><b>msqlimport</b></td>
<td>Loads a flat file in ASCII format into an mSQL database.</td>
</tr>
<tr>
<td align=center><b>relshow</b></td>
<td>The mSQL schema viewer. Shows
<a href="#schema">table details</a> for a given database.</td>
</tr>
<tr>
<td align=center><b>w3-msql</b></td>
<td>CGI program that allows users to embed mSQL
statements in their HTML documents. </td>
</tr>
<tr>
<td align=center><b>w3-auth</b></td>
<td>Access control and authentication module for
use with <tt>w3-msql</tt></td>
</tr>
<tr>
<td align=center><b>lite</b></td>
<td>A stand alone mSQL scripting language. </td>
</tr>
</table>
</center>
<p>
For more details on these programs see the documentation that comes
with mSQL. <p>
<hr>
<h3><a name="sql-commands">What SQL commands are supported?</a></h3>
mSQL version 1.<i>x</i> supports the following SQL commands: <p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th>
mSQL version 1.<i>x</i>
</th>
</tr>
<tr>
<td>
<pre>
CREATE TABLE <i>table_name</i> (
<i>col_name</i> col_type [ not null | primary key ]
[, <i>col_name</i> col_type [ not null | primary key ] ]**
)
</pre>
</td>
</tr>
<tr>
<td>
<pre>
DROP TABLE <i>table_name</i>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
INSERT INTO <i>table_name</i> [ ( <i>column</i> [ , <i>column</i> ]** ) ]
VALUES (<i>value</i> [, <i>value</i>]** )
</pre>
</td>
</tr>
<tr>
<td>
<pre>
DELETE FROM <i>table_name</i>
WHERE <i>column</i> OPERATOR <i>value</i>
[ AND | OR <i>column</i> OPERATOR <i>value</i> ]**
OPERATOR can be <, >, =, <=, >=, <>, or LIKE
</pre>
</td>
</tr>
<tr>
<td>
<pre>
SELECT [ DISTINCT ] [<i>table</i>.]<i>column</i> [ , [<i>table</i>.]<i>column</i> ]**
FROM <i>table</i> [ = <i>alias</i>] [ , <i>table</i> [ = <i>alias</i>] ]**
[ WHERE [<i>table</i>.]<i>column</i> OPERATOR VALUE
[ AND | OR [<i>table</i>.]<i>column</i> OPERATOR VALUE]** ]
[ ORDER BY [<i>table</i>.]<i>column</i> [DESC] [, [<i>table</i>.]<i>column</i> [DESC] ] [LIMIT <i>n</i>]
OPERATOR can be <, >, =, <=, >=, <>, or LIKE
VALUE can be a literal value or a column name
</pre>
</td>
</tr>
<tr>
<td>
<pre>
UPDATE <i>table_name</i> SET <i>column</i>=<i>value</i> [ , <i>column</i>=<i>value</i> ]**
WHERE <i>column</i> OPERATOR <i>value</i>
[ AND | OR <i>column</i> OPERATOR <i>value</i> ]**
OPERATOR can be <, >, =, <=, >=, <>, or LIKE
</pre>
</td>
</tr>
</table>
</center>
<p>
For more details see the documentation that comes with mSQL version
1.<i>x</i>. <p>
mSQL version 2.<i>x</i> supports the following SQL commands: <p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th>
mSQL version 2.<i>x</i>
</th>
</tr>
<tr>
<td>
<pre>
CREATE TABLE <i>table_name</i> (
<i>col_name</i> col_type [ not null ]
[, <i>col_name</i> col_type [ not null ] ]**
)
</pre>
</td>
</tr>
<tr>
<td>
<pre>
CREATE [ UNIQUE ] INDEX <i>index_name</i> ON <i>table_name</i> (
<i>col_name</i> [, <i>col_name</i> ]**
)
</pre>
</td>
</tr>
<tr>
<td>
<pre>
CREATE SEQUENCE ON <i>table_name</i>
[ STEP <i>step_val</i> ] [ VALUE <i>initial_val</i> ]
</pre>
</td>
</tr>
<tr>
<td>
<pre>
DROP TABLE <i>table_name</i>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
DROP INDEX <i>index_name</i> FROM <i>table_name</i>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
DROP SEQUENCE FROM <i>table_name</i>
</pre>
</td>
</tr>
<tr>
<td>
<pre>
INSERT INTO <i>table_name</i> [ ( <i>column</i> [ , <i>column</i> ]** ) ]
VALUES (<i>value</i> [, <i>value</i>]** )
</pre>
</td>
</tr>
<tr>
<td>
<pre>
DELETE FROM <i>table_name</i>
WHERE <i>column</i> OPERATOR <i>value</i>
[ AND | OR <i>column</i> OPERATOR <i>value</i> ]**
OPERATOR can be <, >, =, <=, >=, <>, LIKE, RLIKE or CLIKE
</pre>
</td>
</tr>
<tr>
<td>
<pre>
SELECT [ DISTINCT ] [<i>table</i>.]<i>column</i> [ , [<i>table</i>.]<i>column</i> ]**
FROM <i>table</i> [ = <i>alias</i>] [ , <i>table</i> [ = <i>alias</i>] ]**
[ WHERE [<i>table</i>.]<i>column</i> OPERATOR VALUE
[ AND | OR [<i>table</i>.]<i>column</i> OPERATOR VALUE]** ]
[ ORDER BY [<i>table</i>.]<i>column</i> [DESC] [, [<i>table</i>.]<i>column</i> [DESC] ] [LIMIT <i>n</i>]
OPERATOR can be <, >, =, <=, >=, <>, LIKE, RLIKE or CLIKE
VALUE can be a literal value or a column name
WHERE clauses may contain parentheses () to nest conditions
</pre>
</td>
</tr>
<tr>
<td>
<pre>
UPDATE <i>table_name</i> SET <i>column</i>=<i>value</i> [ , <i>column</i>=<i>value</i> ]**
WHERE <i>column</i> OPERATOR <i>value</i>
[ AND | OR <i>column</i> OPERATOR <i>value</i> ]**
OPERATOR can be <, >, =, <=, >=, <>, LIKE, RLIKE or CLIKE
</pre>
</td>
</tr>
</table>
</center>
<p>
For more details see the documentation that comes with mSQL version
2.<i>x</i>. <p>
<hr>
<h3><a name="keys">Does mSQL support keys?</a></h3>
Yes. <p>
Under mSQL version 1.<i>x</i> any single field of a table can be
designated as the <tt>PRIMARY KEY</tt>. These keys are, by definition,
unique. mSQL version 1.<i>x</i> does not support multiple keys within
a table. <p>
The creation of a <tt>PRIMARY KEY</tt> is made during the table
declaration, for example: <p>
<pre>
CREATE TABLE employee (
employee_number INT PRIMARY KEY,
department CHAR(20),
first_name CHAR(20) NON NULL,
last_name CHAR(20) NON NULL
)
CREATE TABLE department (
department_name CHAR(20) PRIMARY KEY
)
</pre>
For more details see the documentation that comes with mSQL version
1.<i>x</i>. <p>
mSQL version 2.<i>x</i> has disposed of the <tt>PRIMARY KEY</tt>
in favour of an indexing mechanism. <p>
An <tt>INDEX</tt> may be created for any field of a table at any time,
for example: <p>
<pre>
CREATE UNIQUE INDEX idx1 ON employee(employee_number)
CREATE INDEX idx2 ON employee(first_name, last_name)
</pre>
This examples shows that the first <tt>INDEX</tt>, <i>idx1</i>, is
unique. This is identical to the <tt>PRIMARY KEY</tt> concept used by
mSQL version 1.<i>x</i>. The second <tt>INDEX</tt>, <i>idx2</i>, need
not be unique. <i>idx2</i> also spans two fields within a table which
will improve performance whenever a search is made based on these two
fields. <p>
These indices will be used automatically whenever a query is sent to
the database engine that uses those fields in its <tt>WHERE</tt>
clause. The user is not required to specify any special values in the
query to ensure the indices are used to increase performance. <p>
<hr>
<h3><a name="datatypes">What datatypes are supported?</a></h3>
mSQL version 1.<i>x</i> supports the following datatypes: <p>
<pre>
int (4 bytes) -2147483646 <= i <= 2147483647
real (8 bytes) 4.94E-324 <= x <= 1.79E+308, -1.79E+308 <= x <= -4.94E-324
char
</pre>
The internal storage for types <tt>int</tt> and <tt>real</tt> is held at
4 bytes and 8 bytes respectively, regardless of the system architecture
you're using. So even on 64 bit Crays a <tt>real</tt> will be 8 bytes.
<p>
There is NO fixed limit on the size of a character field. Provided you
declare it correctly when the table is defined, mSQL will handle
fields of at least several thousand characters without problems. You
may run into difficulty actually using fields of this size in whatever
language you choose to interface to the mSQL database engine. <p>
<b>Note:</b> If you declare a <tt>char</tt> field with a large size,
each and every row in the table will allocate sufficient storage space
for the <tt>char</tt> field - whether the full size of the field is
used or not. This may lead to very large database tables indeed. <p>
An example of each mSQL version 1.<i>x</i> datatype within a table
declaration follows: <p>
<pre>
CREATE TABLE <i>table_name</i> (
<i>field_name_1</i> INT PRIMARY KEY,
<i>field_name_2</i> REAL,
<i>field_name_3</i> CHAR(10) NOT NULL,
<i>field_name_4</i> CHAR(80),
<i>field_name_5</i> INT NOT NULL,
<i>field_name_6</i> REAL
)
</pre>
For more details see the documentation that comes with mSQL version
1.<i>x</i>. <p>
mSQL version 2.<i>x</i> supports the following datatypes: <p>
<pre>
int (4 bytes) -2147483646 <= i <= 2147483647
uint (4 bytes) 0 <= i <= 4294967295
real (8 bytes) 4.94E-324 <= x <= 1.79E+308, -1.79E+308 <= x <= -4.94E-324
char
text
date dd-mon-yy, for example 12-May-97
time
money
</pre>
The internal storage for types <tt>int/uint</tt> and <tt>real</tt> is
held at 4 bytes and 8 bytes respectively, regardless of the system
architecture you're using. So even on 64 bit Crays a <tt>real</tt> will
be 8 bytes. <p>
There is NO fixed limit on the size of a character field. Provided you
declare it correctly when the table is defined, mSQL will handle
fields of at least several thousand characters without problems. You
may run into difficulty actually using fields of this size in whatever
language you choose to interface to the mSQL database engine. <p>
<b>Note:</b> If you declare a <tt>char</tt> field with a large size,
each and every row in the table will allocate sufficient storage space
for the <tt>char</tt> field - whether the full size of the field is
used or not. This may lead to very large database tables indeed. <p>
<tt>text</tt> (or other 8 bit data) fields are defined with an expected
average length. Values longer than the specified length will be split
between the data table and external overflow buffers. <tt>text</tt>
fields are slower to access than <tt>char</tt> fields and cannot be
used in an <tt>index</tt> or in <tt>LIKE</tt> tests. <p>
An example of each mSQL version 2.<i>x</i> datatype within a table
declaration follows: <p>
<pre>
CREATE TABLE <i>table_name</i> (
<i>field_name_1</i> INT,
<i>field_name_2</i> REAL,
<i>field_name_3</i> CHAR(10) NOT NULL,
<i>field_name_4</i> CHAR(80),
<i>field_name_5</i> INT NOT NULL,
<i>field_name_6</i> REAL,
<i>field_name_7</i> TEXT(25),
<i>field_name_8</i> DATE,
<i>field_name_9</i> UINT,
<i>field_name_10</i> TIME,
<i>field_name_11</i> MONEY
)
</pre>
<b>Note:</b> The storage of real numbers is highly machine dependent.
If you store the number <tt>10.03</tt> don't be surprised if it is
actually stored as either <tt>10.03</tt> or <tt>10.03000000001</tt> or
<tt>10.02999999999</tt>. <p>
<b>Note:</b> The upper and lower limits for real numbers are also
highly machine dependent. Both mSQL version 1.<i>x</i> and 2.<i>x</i>
obtain these values from the system include file: <p>
<pre>
/usr/include/limits.h
</pre>
If you plan on storing very big numbers (positive or negative numbers
with exponents approaching 308) or very small numbers (positive or
negative numbers with exponents approaching -324) you <b>MUST</b> check
whether your operating system will support them. <p>
<b>Note:</b> When dealing with real numbers it might be advisable to
either convert the real number to an integer if possible. For example
if you are dealing with decimal currency, it may be preferable to work
in units of cents rather than dollars - <b>note</b> that mSQL
2.<i>x</i> now has a <tt>MONEY</tt> type which handles this concept -
or to perform some sort of delta check when retrieving values. The
following logic demonstrates one possible application of this concept:
<p>
<pre>
delta = 0.00001
select a real number from a table
if abs(number - expected value) < delta
then
proceed
else
fail
</pre>
<hr>
<h3><a name="api">What functions does the mSQL API provide?</a></h3>
The mSQL API provides the following functions and macros: <p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th colspan=3>mSQL version 1.<i>x</i></th>
</tr>
<tr>
<th>Return Type</th>
<th>Prototype</th>
<th>Type</th>
</tr>
<tr>
<td>int</td>
<td>msqlConnect(char *host);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlSelectDB(int sock, char *dbname);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlQuery(int sock, char *query);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlStoreResult();</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlFreeResult(m_result *result);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_row</td>
<td>msqlFetchRow(m_result *result);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlDataSeek(m_result *result, int pos);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlNumRows(m_result *result);</td>
<td align=center>MACRO</td>
</tr>
<tr>
<td>m_field *</td>
<td>msqlFetchField(m_result *result);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlFieldSeek(m_result *result, int pos);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlNumFields(m_result *result);</td>
<td align=center>MACRO</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListDBs(int sock);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListTables(int sock);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListFields(int sock, char *tableName);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlClose(int sock);</td>
<td align=center>FUNCTION</td>
</tr>
</table>
</center>
<p>
For more details see the documentation that comes with mSQL version
1.<i>x</i>. <p>
<b>Note:</b> The PostScript documentation that comes with mSQL version
1.<i>x</i> lists the function <tt>msqlClose()</tt> as type
<tt>int</tt>. This is incorrect. It is actually type <tt>void</tt>.
<p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th colspan=3>mSQL version 2.<i>x</i></th>
</tr>
<tr>
<th>Return Type</th>
<th>Prototype</th>
<th>Type</th>
</tr>
<tr>
<td>int</td>
<td>msqlConnect(char *host);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlSelectDB(int sock, char *dbname);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlQuery(int sock, char *query);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlStoreResult();</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlFreeResult(m_result *result);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_row</td>
<td>msqlFetchRow(m_result *result);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlDataSeek(m_result *result, int pos);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlNumRows(m_result *result);</td>
<td align=center>MACRO</td>
</tr>
<tr>
<td>m_field *</td>
<td>msqlFetchField(m_result *result);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlFieldSeek(m_result *result, int pos);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>int</td>
<td>msqlNumFields(m_result *result);</td>
<td align=center>MACRO</td>
</tr>
<tr>
<td>m_seq *</td>
<td>msqlGetSequenceInfo(int sock, char *table);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListDBs(int sock);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListTables(int sock);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListFields(int sock, char *tableName);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>m_result *</td>
<td>msqlListIndex(int sock, char *tableName, char *index);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>void</td>
<td>msqlClose(int sock);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>char</td>
<td>msqlUnixTimeToDate(char *date);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>char</td>
<td>msqlUnixTimeToTime(char *date);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>time_t</td>
<td>msqlDateToUnixTime(char *date);</td>
<td align=center>FUNCTION</td>
</tr>
<tr>
<td>time_t</td>
<td>msqlTimeToUnixTime(char *date);</td>
<td align=center>FUNCTION</td>
</tr>
</table>
</center>
<p>
For more details see the documentation that comes with mSQL version
2.<i>x</i>. <p>
<b>Note:</b> The HTML documentation that comes with mSQL version
2.<i>x</i> lists the function <tt>msqlClose()</tt> as type
<tt>int</tt>. This is incorrect. It is actually type <tt>void</tt>.
<p>
<hr>
<h3><a name="views">Are views or virtual tables supported?</a></h3>
No. <p>
This feature may be included in mSQL version 2. <p>
<hr>
<h3><a name="table-aliasing">Does mSQL support table aliasing?</a></h3>
Yes. <p>
As an example, consider this method to find the list of grandparents
from a child/parent tuple: <p>
<pre>
SELECT t1.parent, t2.child from parent_data=t1,parent_data=t2
WHERE t1.child=t2.parent
</pre>
mSQL also supports the SQL standard method of table aliasing which uses
either a space character or the keyword AS instead of an = character.
So the above example can also be written as either: <p>
<pre>
SELECT t1.parent, t2.child from parent_data t1,parent_data t2
WHERE t1.child=t2.parent
</pre>
or
<pre>
SELECT t1.parent, t2.child from parent_data AS t1,parent_data AS t2
WHERE t1.child=t2.parent
</pre>
<hr>
<h3><a name="column-constraints">Are column constraints
supported?</a></h3>
No. <p>
<hr>
<h3><a name="stored-procedures">Are stored procedures
supported?</a></h3>
No - that's getting beyond the scope of Mini SQL (see Oracle :) <p>
<hr>
<h3><a name="acl">Are access privileges supported?</a></h3>
Yes. <p>
mSQL has an access control file which allows the database administrator
to control access on a user and host level. <p>
For more details see the documentation that comes with mSQL. <p>
mSQL does not support access control from within SQL commands. <p>
<hr>
<h3><a name="blobs">Does mSQL support BLOBs?</a></h3>
BLOBs are <b>B</b>inary <b>L</b>arge <b>OB</b>jects. Typical examples
would be large blocks of text, graphics or audio data. <p>
The current release of mSQL has NO direct support for BLOBs. However,
you can always store the path name of a file that points to the BLOB in
one of the fields of your table. Then your application can deal with
the file name appropriately. <p>
If you're dealing with large blocks of text, you may also wish to
consider this approach from Pascal Forget
<a href="mailto:pascal@wsc.com"><pascal@wsc.com></a>: <p>
<pre>
Another possible hack would be to have the "block_text"
record contain a pointer to a "text_lines" table. This
table would contain a linked list of text lines like this:
CREATE TABLE text_lines (
line_id int primary key,
string char(80),
next_line int
)
</pre>
Mike Eggleston
<a href="mailto:mikee@sys8.wfc.com"><mikee@sys8.wfc.com></a>
offers this solution: <p>
<pre>
What I prefer to do in databases where I have text fields containing
near infinite amounts of text is to define several tables like:
create table prog (
id int,
name char(40),
programmer char(40),
....
)\p\g
create table descript (
id int,
line int,
descript char(100)
)\p\g
Then in a program I break up the text as necessary and put one line
of text in each record of <descript>. When I want it back, by
program, I [use]
select line, descript from prog, descript
where prog.id = descript.id
and name = 'foobar' order by line\p\g
</pre>
Later versions of mSQL may have support for BLOBs. <p>
<hr>
<h3><a name="transactions">Are the transaction commands, BEGIN, COMMIT,
and ROLLBACK supported?</a></h3>
No, and they will probably never be supported (once again that's beyond
the scope of mSQL).<p>
The mSQL server handles requests serially - that is only one user's
request is handled at a time. Therefore there is no danger of a user
reading from a table that is currently being updated by another user.
<p>
However, there is the possibility that the same read operations may
straddle another user's write operation so that different data will be
returned from each read. <p>
mSQL version 2 will provide client initiated locking. <p>
<hr>
<h3><a name="table-limits">What are the limits on table and field
names?</a></h3>
A table or field name MUST begin with an alphabetic character. The
remainder of the name may be any of the following 63 characters: <p>
<ul>
<li> A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
<li> a b c d e f g h i j k l m n o p q r s t u v w x y z
<li> 0 1 2 3 4 5 6 7 8 9
<li> _ <i>(that's an "underbar" NOT a
"dash")</i>
</ul>
The maximum name length is set to 20 characters. That's for a table or
a field in a table. This allows for
813621925049196536663393538834956800 possible naming combinations using
the characters listed above. For the mathematically inclined that's:
<p>
<pre>
19
-----
\
\ i
52 * / 63 = 813621925049196536663393538834956800
/
-----
i = 0
</pre>
Though in practise, many of these combinations will probably remain
unused. <p>
While not recommended, the default maximum name length value of 20 can
be changed by editing the mSQL source code. However, if you change it
AFTER you have already created ANY databases, the old databases will be
unreadable. To avoid this problem, follow this procedure: <p>
<ol>
<li> Dump your old databases to ASCII files using
<a href="#support-progs"><tt>msqldump</tt></a>. <p>
<li> Drop your old databases using
<a href="#support-progs"><tt>msqladmin</tt></a>. <p>
<li> Shutdown the mSQL database server
<a href="#support-progs"><tt>msqld</tt></a> using
<a href="#support-progs"><tt>msqladmin</tt></a>. <p>
<li> Edit the mSQL source and modify
<pre>
./src/msql/msql_priv.h
</pre>
Change the line reading <p>
<pre>
#define NAME_LEN 19 /* Field/table name length */
</pre>
to suit your needs. Ensure that you use a number that is one less
than the maximum value you desire. For example, if you wish to have
a name length of 36 you would change the line to read: <p>
<pre>
#define NAME_LEN 35 /* Field/table name length */
</pre>
<li> Recompile and install the modified mSQL. <p>
<li> Start the new mSQL database server
<a href="#support-progs"><tt>msqld</tt></a>. <p>
<li> Create new databases using
<a href="#support-progs"><tt>msqladmin</tt></a>. <p>
<li> Repopulate your databases using
<a href="#support-progs"><tt>msql</tt></a> and the ASCII dumps from
step 1.
</ol>
<hr>
<h3><a name="user-limits">What other limits can be modified?</a></h3>
The file <p>
<pre>
./src/msql/msql_priv.h
</pre>
contains the definitions of the internal mSQL limits: <p>
<pre>
#define MAX_FIELDS 75 /* Max fields per query */
#define MAX_CON 24 /* Max connections */
#define BUF_SIZE (256*1024) /* Read buf size if no mmap() */
#define NAME_LEN 19 /* Field/table name length */
#define PKT_LEN (32*1024) /* Max size of client/server packet */
#define CACHE_SIZE 8 /* Size of table cache */
</pre>
If you want to increase them you can just edit this file and recompile.
Don't change MAX_CON or CACHE_SIZE without understanding why these
limits are set (maximum file descriptors per process etc). <p>
Changing any of these parameters will almost certainly make any
existing databases unreadable. To avoid this problem, follow this
procedure: <p>
<ol>
<li> Dump your old databases to ASCII files using
<a href="#support-progs"><tt>msqldump</tt></a>. <p>
<li> Drop your old databases using
<a href="#support-progs"><tt>msqladmin</tt></a>. <p>
<li> Shutdown the mSQL database server
<a href="#support-progs"><tt>msqld</tt></a> using
<a href="#support-progs"><tt>msqladmin</tt></a>. <p>
<li> Edit the mSQL source and modify
<pre>
./src/msql/msql_priv.h
</pre>
changing the definitions to suit your needs. <p>
<li> Recompile and install the modified mSQL. <p>
<li> Start the new mSQL database server
<a href="#support-progs"><tt>msqld</tt></a>. <p>
<li> Create new databases using
<a href="#support-progs"><tt>msqladmin</tt></a>. <p>
<li> Repopulate your databases using
<a href="#support-progs"><tt>msql</tt></a> and the ASCII dumps
from step 1.
</ol>
<hr>
<h3><a name="db-size">How much data can mSQL address?</a></h3>
mSQL can theoretically address tables with a maximum size of 4
gigabytes. In practise you'll probably run up against operating system
limitations well before this theoretical limit. <p>
<hr>
<h3><a name="expressions">Are there any limitations in the way mSQL
handles logical expressions?</a></h3>
mSQL version 1.<i>x</i> has a very simplistic approach to logical
expressions. <p>
Consider the SQL query: <p>
<pre>
SELECT something from somewhere WHERE
name='jan' or country='italy' and sex='female' or title='ms'
</pre>
Under mSQL version 1.<i>x</i>, the parser will scan the condition
from left to right. So in this example the condition reads: <p>
<pre>
((name='jan' or country='italy') and sex='female') or title='ms'
</pre>
mSQL version 1.<i>x</i> does NOT support parentheses in logical
expressions, so there is <b>NO</b> way to change this parsing. <p>
Ted Harding <a href="mailto:Ted.Harding@nessie.mcc.ac.uk">
<Ted.Harding@nessie.mcc.ac.uk></a> provides some solutions for
three component queries. <p>
Ted writes: <p>
<pre>
Let's get something clear: ALL 3-component (or equivalent) queries
can be implemented in mSQL (without parentheses and using the mSQL
left-to-right evaluation). There are only the following:
(A and B) and C = A and (B and C) = A and B and C
(A or B) or C = A or (B or C) = A or B or C
(A and B) or C = A and B or C
A and (B or C) = (B or C) and A = B or C and A
(A or B) and C = A or B and C
A or (B and C) = (B and C) or A = B and C or A
Queries like A and B and C and (E or F) are the same as (A and B
and C) and (E or F) which is the same form as G and (E or F).
The trouble starts with 4-component queries such as (A or B) and (C
or D) for which there is no one-pass generally correct mSQL
representation.
</pre>
mSQL version 2.<i>x</i> allows parentheses within logical expressions
so this limitation is eliminated. <p>
<hr>
<h3><a name="return-values">How does mSQL return values?</a></h3>
mSQL returns all values as ASCII strings. If, for example, you are
expecting an integer result you may have to do some internal
conversions depending on the language you're using. <p>
In C, for example, see the manual pages on <tt>atoi()</tt>. <p>
<hr>
<h3><a name="return-order">How does SELECT return rows?</a></h3>
On Tue, 4 Jul 1995, Karri-Pekka Laakso wrote: <p>
<pre>
Does SELECT return the rows always in order 'first inserted first',
if there is no ORDER statement given, and the rows are selected
from one table only, and there has been no DELETEs on that table?
It seems be so, but is it guaranteed?
</pre>
David Hughes replied: <p>
<pre>
This is guaranteed. The only time the rows will be returned in
another order is if you have deleted a row and it's then filled by
a later insert.
</pre>
<hr>
<h3><a name="nested-tables">Can mSQL nest tables?</a></h3>
On Tue, 25 Jul 1995, Jerome Stoller wrote: <p>
<pre>
I am new at mSQL, and have a beginner question: Is it possible to
create a table "normally", and to have the fields of one
of the column being[sic] another table?
</pre>
David Hughes replied: <p>
<pre>
You can't nest tables in mSQL (don't think you can in ANSI SQL
either). What you can do is to use a common value as a key to join
the contents of two tables (eg. a part number or a user ID).
</pre>
<hr>
<h3><a name="storage-overhead">What storage overheads does mSQL
have?</a></h3>
mSQL stores each database in its own directory under the
'<tt>msqldb</tt>' directory of wherever you specified mSQL should be
installed. For example if you specified that mSQL should be installed
in: <p>
<pre>
/usr/local/Minerva/
</pre>
then the databases will be created in the directory: <p>
<pre>
/usr/local/Minerva/msqldb/
</pre>
<b>Note</b> that this can be overridden by specifying the MSQL_HOME
environment variable when starting
<a href="#support-progs"><tt>msqld</tt></a>. <p>
Each table in the database is stored as a number of files: <p>
<ul>
<li><b><i>dbname/table</i>.dat</b> - table data. This file contains
the data for all the rows in the table. <p>
For each field in a table, mSQL will also store an additional flag
byte. mSQL also stores an additional flag byte for each row of the
table. <p>
Consider the following table: <p>
<pre>
CREATE TABLE test (
f0 char(13),
f1 int,
f2 real,
f3 real,
f4 real,
f5 real,
f6 int
)
</pre>
Storage space for each row of this table would be: <p>
<pre>
(13 * char) + (2 * int) + (4 * double) + (7 * fields) + (1 * rows)
= (13 * 1) + (2 * 4) + (4 * 8) + (7 * 1) + 1
= 61 bytes
</pre>
So if this table had 1000 records, it would occupy 61000 bytes of
disk space. (In reality it may occupy slightly more real disk space
because of the way the underlying file system behaves. This is
operating system specific and not really an issue to worry about.
If you do an '<tt>ls -l</tt>' on the file it will show 61000
bytes). <p>
<li><b><i>dbname/table</i>.key</b> - table keys. This file will
only exist if the table has a primary key. It contains the key
pointers into the table data file. <p>
The size of this file will be the size of the key plus one flag
byte times the number of rows in the table. In the above example,
if the table was defined as: <p>
<pre>
CREATE TABLE test (
f0 char(13) primary key,
f1 int,
f2 real,
f3 real,
f4 real,
f5 real,
f6 int
)
</pre>
and the table had 1000 rows, the size of the data file would still
be 61000 bytes and the size of the key file would be: <p>
<pre>
((13 * char) + 1) * 1000
= ((13 * 1) + 1) * 1000
= 14 * 1000
= 14000 bytes
</pre>
<li><b><i>dbname/table</i>.def</b> - table definition. This file
contains the table structure definition. <p>
Each field in the table has a 64 byte definition. Using the example
above, the table has 7 fields so the size of the definition file
will be: <p>
<pre>
7 * 64 = 448 bytes
</pre>
<li><b><i>dbname/table</i>.stk</b> - table stack. This file keeps
track of the holes or empty rows in the table. <p>
For every hole in the table, this file will contain a 4 byte
integer indicating the row number of the hole. It is accessed like
a stack. When a row is deleted, it's index is appended to the
file. When an insert is done, the last 4 bytes are
"popped" off the file and the file is truncated back 4
bytes. <p>
If the table contains 20 holes, the size of the stack file will be:
<p>
<pre>
20 * 4 = 80 bytes
</pre>
If the table contains no holes then this file will have zero
length.
</ul>
Therefore to calculate the storage requirements for a table, use one of
the following formulae: <p>
<dl>
<dt><b>Tables with a primary key:</b>
<dd>
<pre>
table_storage_requirements
= expected_max_rows *
(
number_of_fields + 1 + total_chars +
(4 * total_ints) + (8 * total_reals) +
(size_of_key + 1) +
(4 * expected_deletion_ratio)
) +
(total_fields * 64)
</pre>
<dt><b>Tables without a primary key:</b>
<dd>
<pre>
table_storage_requirements
= expected_max_rows *
(
number_of_fields + 1 + total_chars +
(4 * total_ints) + (8 * total_reals) +
(4 * expected_deletion_ratio)
) +
(total_fields * 64)
</pre>
</dl>
Using the keyed table above, if we expect it to contain a maximum of
10000 rows and we expect to have a 10 percent deletion ratio (that is
at any one time we expect that 10 percent of our rows have been deleted
but not replaced by new rows), we should allow for: <p>
<pre>
10000 *
(
7 + 1 + 13 +
(4 * 2) + (8 * 4) +
(13 + 1) +
(4 * 0.10)
) +
(7 * 64)
= 10000 * ( 21 + 8 + 32 + 14 + 0.4) + 448
= 754448 bytes
</pre>
plus a handful of bytes to store file names in directories. <p>
<b>Note</b> that this is the maximum storage allocation. Unlike some
other database systems, mSQL only uses disk space when it has data to
add to a table - it does NOT allocate a large block of empty disk space
and then proceed to fill it. If our example only had 1000 rows the
storage requirements would only be 75848 bytes. <p>
<hr>
<h3><a name="ram">Does <tt>msqld</tt> allocate more RAM to itself as
new databases are added?</a></h3>
On Fri, 11 Aug 1995, Andrew Waegel wrote: <p>
<pre>
does msqld allocate more ram to itself as new db's are added? i.e.
is any part of the database held in ram or does it just access the
database files directly from disc? I need to do some planning, and
want to know if I need to plan to get more simms...
</pre>
David Hughes replies: <p>
<pre>
If your OS supports mmap() (e.g. Solaris, SunOS, *BSD, BSDI, Linux
1.3.x, HP-UX >9.x) then the more memory you throw at it the
better things will get if you are using big databases. The data is
left on disk but is accessed via the virtual memory subsystem so it
will be in memory some of the time.
If you are not using mmap() then data is just read from disk as it
is needed. There's a small buffer in the read code to make things
faster but that's about it. It doesn't matter how many databases
you have defined it only uses 1 buffer.
</pre>
<hr>
<h3><a name="perform">Does performance degrade as the number of
databases increase?</a></h3>
On Fri, 11 Aug 1995, Andrew Waegel wrote:
<pre>
Does performance degrade at all as the number of databases
increases? That is, say a query from database A took n seconds when
database A was the only one served by msqld. After adding databases
B, C, D and E, should the database A query take any longer? It
seems like 'no' from my experience, but...
</pre>
David Hughes replies: <p>
<pre>
No. It will degrade if people are hitting the new databases at the
same time as they are hitting database A though. msqld only handles
1 query at a time so if 2 queries come in they are queued and
processed in order.
</pre>
<hr>
<h3><a name="cursors">Does mSQL support cursors?</a></h3>
Pascal Forget replies to a posting by Brian Bartholomew:
<pre>
> To browse the database, I want mSQL to return me the first row
> in the database, and keep a pointer to it. Then sometime later
> I can ask it for the second row, and so on.
mSQL does not provide support for cursors.
You'll have to issue a SELECT query each time you want the next
row. mSQL has no provisions for modifying a result set once it has
been created. I suggest you add a field containing a unique
identifier for each row, then fetch the next row using:
SELECT ... FROM mytable where unique_field > last_id LIMIT 1
> How do I express this in sql?
If you find a way to express it, it most certainly won't be in
standard SQL, as the language has no support for cursors.
> I see that I could add an explicit field that was an arbitrary
> row number, and query for the current row number +/- 1, but over
> time with insertions and deletions there would be gaps and the
> query would break. How is this problem usually solved?
The select statement I gave you won't break even if there are gaps
in the unique identifiers. You can periodically "compact" the
numbers if you want.
</pre>
<hr>
<h3><a name="intl">Does mSQL support different character sets?</a></h3>
Patrik Faltstrom writes: <p>
<pre>
Yes, as long as the client that fetches the characters knows what
character set you are using. I.e. there is no support in mSQL for
keeping track of the character set name, but mSQL is 8bit clean so
you can store 8bit characters (in whatever character set).
In Digger, the Whois++ server, we store UNICODE characters by
encoding them first into UTF-8 which is an 8bit encoding scheme
described in UNICODE 1.1.
</pre>
Neil Bowers <a href="mailto:neilb@cre.canon.co.uk">
<neilb@cre.canon.co.uk></a> has written a paper on
"<i>Processing Japanese Text with mSQL and Perl</i>". It is
available from: <p>
<pre>
<a href="http://www.cre.canon.co.uk/~neilb/jmSQL.html">http://www.cre.canon.co.uk/~neilb/jmSQL.html</a>
</pre>
<hr>
<h3><a name="afs">Why doesn't mSQL work when installed in disk space
served by the Andrew File System (AFS)?</a></h3>
Jon Leech <a href="mailto:leech@cs.unc.edu">
<leech@cs.unc.edu></a> writes: <p>
<pre>
AFS does not support some Unix file system behaviour that's needed
by mSQL. You cannot create Unix domain sockets in AFS space, and
mmap() does not work on at least some client-server combinations,
if not all.
You should install mSQL and its databases in NFS or local Unix
filesystems.
</pre>
Other users have also reported problems when running mSQL from NFS
mounted partitions. To be absolutely safe you should only run
<tt>msqld</tt> from the same machine on which the physical disks
containing the mSQL databases are attached. <p>
<hr>
<hr width="75%">
<center>
<h2><a name="install-problems">Installation Problems</a></h2>
</center>
<h3><a name="irix-username">Under IRIX (SGI) I get problems relating to
my username</a></h3>
Colin Surprenant reports: <p>
<pre>
The solution to the problem with using the socket and then nsl
libraries with NIS in IRIX 5.2 is:
1. Do not link them if they are not needed :) This is the case for
mSQL.
or
2. link libc BEFORE the socket and the nsl libraries.
For those who didn't know, the problem is that if you use NIS and
link socket or nsl, the getpwuid() function doesn't work.
</pre>
To ensure that the unnecessary libraries are avoided, edit
<tt>targets/<i>your-architecture</i>/site.mm</tt> and change the line
<pre>
EXTRA_LIB= -lsocket -lnsl -lgen -ldl
</pre>
so that it reads: <p>
<pre>
EXTRA_LIB=
</pre>
<hr>
<h3><a name="osf1-hpux">On OSF/1 or HP-UX I have trouble starting
<tt>msqld</tt> at boot time</a></h3>
David-Michael Lincke reports: <p>
<pre>
Looks like the same thing that happens under HP-UX with background
processes in rc scripts. They are killed off on exit of the ksh
functions.
Create yourself a wrapper for msqld. In there you do a fork and
exit the parent process in the child process you do a call to
setsid() to get rid of the controlling terminal followed by a call
to execl() to launch msqld. You might also want to close all open
file descriptors before calling exec.
</pre>
An alternative to this approach is to place the following in
<tt>/etc/inittab</tt>
<pre>
msql:3:respawn:/usr/local/Minerva/bin/msqld </dev/console >/dev/console 2>&1
</pre>
This assumes that your mSQL super user is "root".
<p>
The next version of the FAQ will attempt to address this issue in
detail. <p>
<hr>
<h3><a name="osf1-gcc">Should I use <tt>cc</tt> or <tt>gcc</tt> when
building mSQL on my Dec Alpha running OSF/1?</a></h3>
Rick Beebe writes: <p>
<pre>
DEC Alphas running OSF/1 (Digital Unix): The original mSQL docs
recommended using cc rather than gcc on this platform. In my
experience this is still good advice. If you have gcc on the
machine, however, autoconf will find it and default to it. After
running 'setup' edit site.mm and change 'gcc' to 'cc' and
'bison -y' to yacc.
</pre>
<hr>
<h3><a name="linux-mmap">Does mSQL work with Linux
<tt>mmap()</tt>?</a></h3>
Version 1.3 or greater of the Linux operating system has full
<tt>mmap()</tt> support. If you're using such a version of Linux, mSQL
will work perfectly well using <tt>mmap()</tt>. <p>
If you have an earlier version of Linux you can either upgrade or
ensure that <tt>mmap()</tt> support in mSQL is disabled by running the
'<tt>setup</tt>' program and then editing <p>
<pre>
./targets/<i>your-architecture</i>/site.mm
</pre>
and ensuring the <tt>mmap()</tt> directive reads: <p>
<pre>
MMAP=
</pre>
and then recompile the mSQL package. <p>
<hr>
<h3><a name="hpux-compile">Does mSQL work with HP-UX?</a></h3>
Arley Carter (via David Hughes) writes: <p>
<pre>
I just built msql-1.0.10 on hpux 9.05. It appears that you have
slain the mmap bug. Good job. The only mods I [made] are in site.mm
CC= cc -Ae +O3 +Z
Remove -g flags also or you'll get a lot of annoying messages about
opt not compatible with debug. The test suites for msql and
msqlperl ran flawlessly.
</pre>
<hr>
<h3><a name="hpux-perl">I'm having trouble compiling MsqlPerl with
mSQL under HP-UX</a></h3>
Arley Carter writes: <p>
<pre>
This problem has to do with the way HP-UX deals with shared
libraries.
Ensure the <tt>EXTRA_CFLAGS</tt> option in the file:
./targets/<i>your-architecture</i>/site.mm
reads:
EXTRA_CFLAGS= -Ae +O3 +Z
and recompile mSQL.
The <tt>+Z</tt> option ensures that "position independent
code" is used when creating object files. For more information
see the manual pages on your compiler.
</pre>
<hr>
<h3><a name="sco-unix">How can I install mSQL on a SCO Unix
system?</a></h3>
<b>Note:</b> This fix has had some conflicting results. Please let me
<a href="mailto:Peter.Samuel@uniq.com.au">
(<Peter.Samuel@uniq.com.au>)</a> know if it works OR fails. If it
fails, let me know exactly where (if possible) and how you fixed it (if
you did). <p>
The following is a summary of the efforts required by Andrew Cash
<a href="mailto:cash_a@sls.co.uk"><cash_a@sls.co.uk></a>
to install mSQL version 1.0.8 on a SCO Unix system. It should work
perfectly well for version 1.0.9 as well. <p>
<ul>
<li> Unpack the source code and create the site dependent files as
follows:
<pre>
gunzip -c msql-1.0.9.tar.gz | tar xvf -
cd msql-1.0.9
make target
cd targets/<i>your-architecture</i>
./setup
<i>answer questions</i>
</pre>
<li> In the file: <p>
<pre>
./common/config.h
</pre>
ensure the lines referring to the <tt>sys/select.h</tt> include file are
commented out as follows: <p>
<pre>
/* Defined if you have sys/select.h */
/* #define HAVE_SYS_SELECT_H 1 */
</pre>
<li> <b>Note:</b> This step should only be applied if you use gcc
and bison. These compilation tools will attempt to use
<tt>alloca()</tt> instead of <tt>malloc()</tt> which will fail
under SCO Unix. If you do not use bison, you should skip this
step. <p>
SCO Unix doesn't have an <tt>alloca()</tt> library function so
you'll have to use <tt>malloc()</tt>. You need to generate the
file: <p>
<pre>
./msql/msql_yacc.c
</pre>
so run: <p>
<pre>
make
</pre>
until it completes (or fails). Ensure that the <tt>msql_yacc.c</tt>
file has been created. If it has,
<a href="#how-to-patch">apply</a>the following patch to the file.
(Use the "<tt>-l</tt>" option of <tt>patch</tt> to avoid
any problems with mismatched whitespace. <i>That's an
"el", NOT a "one" or an "eye"</i>).
<p>
This patch ensures that <tt><malloc.h></tt> is explicitly
included and that all references to <tt>alloca()</tt> are changed
to <tt>malloc()</tt>. <b>Note:</b> This patch has been generated
based on the output from the <tt>bison</tt> compiler compiler from GNU.
It should <b>NOT</b> be applied to an <tt>msql_yacc.c</tt>
that has been generated by <tt>yacc</tt> - such a file already
uses <tt>malloc()</tt>.
</ul>
<pre>
<font size="-1">
*** msql/msql_yacc.c.orig Fri Jan 5 13:07:02 1996
--- msql/msql_yacc.c Fri Jan 5 13:09:34 1996
***************
*** 329,362 ****
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
- #ifndef alloca
- #ifdef __GNUC__
- #define alloca __builtin_alloca
- #else /* not GNU C. */
- #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
- #include <alloca.h>
- #else /* not sparc */
- #if defined (MSDOS) && !defined (__TURBOC__)
- #include <malloc.h>
- #else /* not MSDOS, or __TURBOC__ */
- #if defined(_AIX)
#include <malloc.h>
- #pragma alloca
- #else /* not MSDOS, __TURBOC__, or _AIX */
- #ifdef __hpux
- #ifdef __cplusplus
- extern "C" {
- void *alloca (unsigned int);
- };
- #else /* not __cplusplus */
- void *alloca ();
- #endif /* not __cplusplus */
- #endif /* __hpux */
- #endif /* not _AIX */
- #endif /* not MSDOS, or __TURBOC__ */
- #endif /* not sparc. */
- #endif /* not GNU C. */
- #endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
--- 329,335 ----
***************
*** 607,618 ****
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
! yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
__yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
! yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
__yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
! yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
__yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
--- 580,591 ----
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
! yyss = (short *) malloc (yystacksize * sizeof (*yyssp));
__yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
! yyvs = (YYSTYPE *) malloc (yystacksize * sizeof (*yyvsp));
__yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
! yyls = (YYLTYPE *) malloc (yystacksize * sizeof (*yylsp));
__yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */
</font>
</pre>
<ul>
<li> Rebuild <tt>msqld</tt> with the modified <tt>msql_yacc.c</tt>
file by running: <p>
<pre>
make
</pre>
<li> If you are NOT going to be running mSQL as root, then you'll
need to ensure that <tt>msqld</tt> can be installed correctly. Edit
the makefile: <p>
<pre>
./msql/Makefile.full
</pre>
and comment out the mode change line for <tt>msqld</tt> as
follows: <p>
<pre>
# chmod 4750 $(INST_DIR)/bin/msqld
</pre>
Failure to make this change will result in an error during the
install phase. <p>
<li> Install mSQL by running: <p>
<pre>
make install
</pre>
</ul>
<hr>
<h3><a name="solaris">Why won't my third party applications compile
under Solaris 2.<i>x</i>?</a></h3>
Solaris 2.<i>x</i> is an SVR4 version of Unix. When compiling programs
that require network support (this includes any program that uses the
mSQL library), you must explicitly reference the networking libraries
<tt>socket</tt> and <tt>nsl</tt>: <p>
<pre>
gcc -o <i>prog prog.c</i> -I<i>msql_install_dir</i>/include \
-L<i>msql_install_dir</i>/lib -lmsql <b>-lsocket -lnsl</b>
</pre>
<hr>
<h3><a name="linux-setup">Why does <tt>setup</tt> fail when building
mSQL on a Linux system?</a></h3>
Did you install the Linux kernel sources? <p>
If you installed Slackware and didn't get the K series disks then you
will be missing a lot of C header files that you need to compile mSQL.
Go back and grab the kernel sources disks and install them on your box.
<p>
<hr>
<h3><a name="linux-setup">Why can't I run <tt>setup</tt> under
Linux?</a></h3>
This problem involves an interaction between the Linux <tt>setup</tt>
program, the mSQL <tt>setup</tt> program and your <b>$PATH</b>
environment variable. <p>
After unpacking the mSQL distribution and running the <tt>make target</tt>
command, the next step in installing mSQL is to change directories to:
<p>
<pre>
targets/<i>target</i>
</pre>
and run the <tt>setup</tt> command. If you have <tt>/sbin</tt> in your
<b>$PATH</b> ahead of <tt>.</tt>, or you don't have <tt>.</tt> in your
<b>$PATH</b> at all (which is a good idea if you happen to be
<tt>root</tt>) then your shell will attempt to run the Linux
<tt>setup</tt> program ahead of the mSQL <tt>setup</tt> program. <p>
This can be avoided (for all flavours of Unix) by issuing the command
as: <p>
<pre>
./setup
</pre>
This will force your shell to run the <tt>setup</tt> program in the
current working directory, regardless of the contents of your
<b>$PATH</b>. <p>
<hr>
<h3><a name="bind49">Why do I get errors about
"<tt>sys/bitypes.h</tt>" when compiling under Solaris
2.5?</a></h3>
Paul Gregg <a href="mailto:pgregg@tibus.net">
<pgregg@tibus.net></a> writes: <p>
<pre>
Q: When I try to "make all" mSQL on Solaris (2.5 confirmed) it
fails with the error:
../makedepend/makedepend: warning: msqld.c (reading /usr/include/arpa/inet.h,
line 68): cannot find include file "sys/bitypes.h"
not in /usr/include/arpa/sys/bitypes.h
not in ../sys/bitypes.h
not in /usr/include/sys/bitypes.h
../makedepend/makedepend: warning: msqld.c (reading /usr/include/arpa/inet.h,
line 72): cannot find include file "sys/cdefs.h"
not in /usr/include/arpa/sys/cdefs.h
not in ../sys/cdefs.h
not in /usr/include/sys/cdefs.h
A: You have installed BIND 4.9 on your system. Bind replaces your existing
/usr/include/netdb.h, but forgets to include the compatability includes
cdefs.h and bitypes.h
Solution: locate the cdefs.h and bitypes.h files in your BIND source code
bind/compat/include/sys/cdefs.h
bind/compat/include/sys/bitypes.h
and copy these two files to /usr/include/src mSQL should now make
cleanly.
Credit should be given to Emir Mulabegovic <a href="mailto:mulabego@mcs.anl.gov"><mulabego@mcs.anl.gov></a> for this
answer.
</pre>
<hr>
<h3><a name="makedepend">Why do I get errors about
"<tt>POSIX_C_SOURCE</tt>" when compiling under Solaris
2.5?</a></h3>
This only occurs when you are compiling mSQL version 1.<i>x</i>. This
version of mSQL ships with a compile time utility called
<tt>makedepend</tt> developed by the X consortium. This utility is
used in the pre compile phase to establish the dependencies of all the
source code used by mSQL. <p>
The version of <tt>makedepend</tt> that ships with mSQL version
1.<i>x</i> does not appreciate the ANSI C syntax used by the Solaris
2.5 include files and gives a number of errors such as: <p>
<pre>
"strlib.c":225: defined(__EXTENSIONS__) || defined(_REENTRANT) ||
(_POSIX_C_SOURCE - 0 >= 199506L)
^--- expecting )
</pre>
These messages can be safely ignored. The actual compilation of the
mSQL source is unaffected. <p>
If you wish to avoid seeing these messages you can use the following
procedure to use the <tt>makedepend</tt> that is shipped with
OpenWindows 3.5 instead of the version of <tt>makedepend</tt> shipped
with mSQL version 1.<i>x</i>. <p>
<ol>
<li> <tt>cd msql-1.0.16/src/makegen</tt> <p>
<li> edit both <tt>library.mm</tt> and <tt>object.mm</tt> and
change all references to
<pre>
@$(TOP)/makedepend/makedepend
</pre>
so that they read: <p>
<pre>
@/usr/openwin/bin/makedepend
</pre>
<li> <tt>cd ../../targets/Solaris-2.5/Sparc</tt> <p>
<li> <tt>make</tt>
</ol>
This will avoid the error messages listed above but you will now see
the following warning messages: <p>
<pre>
/usr/openwin/bin/makedepend: ignoring option -a
</pre>
These too can be safely ignored. <p>
<hr>
<h3><a name="sgi-libs">Why do I get errors about "<tt>weak
definitions</tt>" when compiling under IRIX?</a></h3>
If you're compiling under Silicon Graphic's IRIX operating system and
see error messages such as: <p>
<pre>
ld: WARNING 134: weak definition of pmap_getport in /usr/lib/libnsl.so
preempts that weak definition in /usr/lib/libc.so.
</pre>
as well as unresolved symbols, you'll need to ensure that unnecessary
libraries are not being used during the compilation. <p>
Edit <tt>targets/<i>your-architecture</i>/site.mm</tt>
and change the line
<pre>
EXTRA_LIB= -lsocket -lnsl -lgen -ldl
</pre>
so that it reads: <p>
<pre>
EXTRA_LIB=
</pre>
<hr>
<h3><a name="aix-ps2">How can I build mSQL version 1.0.16 for an AIX
system running on an IBM PS/2?</a></h3>
mSQL assumes that any AIX system will be running on an RS6000
processor. If you are running AIX on an IBM PS/2 the <tt>make
target</tt> will fail. <p>
David Schuler
<a href="mailto:schuld@btv.ibm.com">
<schuld@btv.ibm.com></a> provides the following patch to solve
this problem: <p>
<pre>
*** scripts/sys-arch.orig Fri Mar 28 16:25:49 1997
--- scripts/sys-arch Fri Mar 28 16:29:19 1997
***************
*** 43,52 ****
if test "$os" = "AIX"
then
- machine="rs6000"
maj=`uname -v`
min=`uname -r`
rev="$maj.$min"
fi
echo "${os}-${rev}-${machine}" | sed 's/ /_/g'
--- 43,57 ----
if test "$os" = "AIX"
then
maj=`uname -v`
min=`uname -r`
rev="$maj.$min"
+ if test $maj -eq 1
+ then
+ machine="i386"
+ else
+ machine="rs6000"
+ fi
fi
echo "${os}-${rev}-${machine}" | sed 's/ /_/g'
</pre>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> this patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>). <p>
<hr>
<h3><a name="apache-auth">How can I make <tt>w3-auth.c</tt> work with
my Apache HTTPD server?</a></h3>
You need to patch the Apache server itself. The following patch from
Simon Kershaw <a href="mailto:Simon.Kershaw@Smallworld.co.uk">
<Simon.Kershaw@Smallworld.co.uk></a> works against Apache 1.2b7:
<p>
<pre>
<font size="-1">
*** src/util_script.c~ Mon Feb 10 11:47:24 1997
--- src/util_script.c Tue Mar 25 15:53:14 1997
***************
*** 174,180 ****
else if (!strcasecmp (hdrs[i].key, "Content-length"))
table_set (e, "CONTENT_LENGTH", hdrs[i].val);
else if (!strcasecmp (hdrs[i].key, "Authorization"))
! continue;
else
table_set (e, http2env (r->pool, hdrs[i].key), hdrs[i].val);
}
--- 174,181 ----
else if (!strcasecmp (hdrs[i].key, "Content-length"))
table_set (e, "CONTENT_LENGTH", hdrs[i].val);
else if (!strcasecmp (hdrs[i].key, "Authorization"))
! table_set (e, "HTTP_AUTHORIZATION", hdrs[i].val);
! /* continue; */
else
table_set (e, http2env (r->pool, hdrs[i].key), hdrs[i].val);
}
</font>
</pre>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> this patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>). <p>
<hr>
<hr width="75%">
<!-- End of Part 2 -->
<center>
<h2><a name="runtime-problems">Runtime Problems</a></h2>
</center>
<h3><a name="root-user"><tt>msqladmin</tt> will not let me create a
database</a></h3>
This one is straight from the manual section on
<a href="#support-progs"><tt>msqladmin</tt></a>. It states that the
only person who is allowed to create a database is the person nominated
as the "root user" during installation. If you indicated that
the database would be running as <tt>root</tt> then you must be
<tt>root</tt> to create a database. <p>
If you indicated that it would not be running as <tt>root</tt>, you
would have then nominated a username for the "root user". In
that case, you must be logged in as the user you nominated before you
can perform admin functions like creation of databases. <p>
The manual also states that you can only perform the admin functions of
<a href="#support-progs"><tt>msqladmin</tt></a> (i.e. any function
other than 'version') from the local host. For security reasons you
cannot perform administrative functions in a client/server manner of a
network. <p>
<hr>
<h3><a name="acl-file">When I start <tt>msqld</tt> it complains about
an ACL file</a></h3>
The ACL file is the file that contains Access Control Lists for mSQL.
It is located in the installation directory and is called
<tt>msql.acl</tt> (e.g. <tt>/usr/local/Minerva/msql.acl</tt>). The
warning indicates that <tt>msqld</tt> couldn't locate an ACL file. This
doesn't stop mSQL from operating, it just implies that everyone on
every machine on your network has read/write access to your databases.
<p>
A sample ACL file is installed in the installation directory. You could
copy this file to <tt>msql.acl</tt> and edit it to reflect the access
you want to offer to your databases. <p>
<hr>
<h3><a name="pid-file">When I start <tt>msqld</tt> it complains about a
PID file</a></h3>
The PID file is just a file in which
<a href="#support-progs"><tt>msqld</tt></a> writes its process ID. If
it can't write to the PID file, <tt>msqld</tt> will still function
correctly. <p>
If you are seeing an error regarding the PID file, then one of the
following could be the cause: <p>
<ul>
<li> The directory in which <tt>msqld</tt> is attempting to create
the PID file does not exist. <p>
<li> The directory in which <tt>msqld</tt> is attempting to create
the PID file does not have sufficient permissions.
</ul>
During the installation, the <tt>setup</tt> program asked you where to
store the PID file: <p>
<pre>
Top of install tree ? [/usr/local/Minerva]
Will this installation be running as root ? [y] n
What username will it run under ? peters
Directory for pid file ? [/var/adm]
</pre>
You must ensure that this directory exists. The mSQL installation
procedure will NOT create this directory for you. <p>
If you did not specify <tt>root</tt> as the mSQL administration user
when you answered the questions: <p>
<pre>
Will this installation be running as root ? [y] n
What username will it run under ? peters
</pre>
you must ensure that the user you specified has write permissions in
the directory in which <tt>msqld</tt> will store its PID file. <p>
Under IRIX 5.3 the <tt>/var/adm</tt> directory can only be written to
by the <tt>root</tt> user, so if your mSQL administration user is NOT
<tt>root</tt> then you'll have to choose some other location such as
<tt>/var/tmp</tt> or <tt>/var/share</tt>. <p>
If you need to change the location of this directory, you can either
rerun the <tt>setup</tt> program, or edit the file: <p>
<pre>
./targets/<i>your_architecture</i>/site.mm
</pre>
and change the line: <p>
<pre>
PID_DIR= /var/adm
</pre>
to suit your needs. <p>
<hr>
<h3><a name="recompile">I've just installed the latest version
of mSQL and now my own applications won't work!</a></h3>
Whenever you install a new version of mSQL you MUST remember to
recompile any third party applications - including those you developed
yourself - to ensure that they are linked with the new version of
<tt>libmsql.a</tt>. You should also recompile third party applications
after <a href="#how-to-patch">installing any patches</a> to mSQL. <p>
Failure to do this will almost certainly guarantee that your
applications will fail at some stage while talking to the new mSQL
database server. You may also miss out on some new feature provided by
the new mSQL API. <p>
<hr>
<h3><a name="setuid">Access control doesn't work with my setuid
applications</a></h3>
<b>Note:</b> This only applies to mSQL version 1.0.10 and previous
versions. mSQL version 1.0.12 (and above) does NOT suffer from this
problem. This section will be removed in future versions of the FAQ. It
is included in this release to accommodate the transitional period
following the recent release of version mSQL 1.0.12. <p>
Consider the following scenario: <p>
<ul>
<li> User <tt>peters</tt> is the ONLY user given read and write
access to the database <i>test</i> by the appropriate additions to
the <tt>msql.acl</tt> file. <p>
<li> An application is created to manipulate the <i>test</i>
database and is saved such that it is a <i>setuid peters</i>
application: <p>
<pre>
-rwsr-xr-x 1 peters db 24576 Nov 13 1995 db_app
</pre>
<li> User <tt>markp</tt> wishes to use the <i>test</i> database
using the <tt>db_app</tt> application. Instead of the <i>setuid</i>
nature of the application allowing <tt>markp</tt> access to the
database, all that happens is the error message: <p>
<pre>
Access to database denied
</pre>
</ul>
This occurs because of the way in which mSQL passes user information to
the database server. It uses the <i>getuid()</i> system call which
returns the real user id of the calling process rather than the
effective user id. <p>
mSQL version 2 will have radically different security mechanisms. <p>
<hr>
<h3><a name="address-in-use">Why do I see an "<tt>Address already
in use</tt>" error message when I attempt to start
<tt>msqld</tt>?</a></h3>
If you're running Linux or SCO Unix, this message can be seen if you
killed the <a href="#support-progs"><tt>msqld</tt></a> process WITHOUT
executing: <p>
<pre>
msqladmin shutdown
</pre>
The TCP/IP port will remain bound for about 90 seconds or so. After
this time the port should be available and <tt>msqld</tt> can be
started successfully. <p>
Another possibility to consider is that something is already using the
TCP/IP port that <a href="#support-progs"><tt>msqld</tt></a> is trying
to use. For a default installation these port numbers are 1112 for a
root user or 4333 for an ordinary user. In this case <i>user</i> means
the name of the user you entered when answering the setup question(s):
<p>
<pre>
Will this installation be running as root ?
What username will it run under ?
</pre>
There are a number of ways you can check for something using the TCP/IP
port: <p>
<ul>
<li><b>msql</b> <p>
If the mSQL monitor program <tt>msql</tt> can connect to the mSQL
database server <tt>msqld</tt> then you KNOW that the database
server is already running. <p>
<li><b>Telnet</b> <p>
Telnet to the database server and specify the mSQL TCP/IP port
number using one of the following commands: <p>
<pre>
telnet <i>dbhost</i> 1112
</pre>
or
<pre>
telnet <i>dbhost</i> 4333
</pre>
You'll see the following types of messages: <p>
<ul>
<li> Nothing is using that port or something is using the port
exclusively: <p>
<pre>
Trying 127.0.0.1 ...
telnet: connect: Connection refused
telnet>
</pre>
<li><tt>msqld</tt> version 1.0.10 running protocol version 6 is
using the port: <p>
<pre>
Trying 127.0.0.1 ...
Connected to localhost.
Escape character is '^]'.
0:6:1.0.10
</pre>
<li> Something else is using the port (or a client process is still
communicating with a running <tt>msqld</tt> process: <p>
<pre>
Trying 127.0.0.1 ...
Connected to localhost.
Escape character is '^]'.
</pre>
</ul>
<li><b>netstat</b> <p>
If your operating system has the <tt>netstat</tt> command, you can
use it to display the contents of various network related data
structures in various formats, depending on the options you
select.
Some of the options that may be helpful are: <p>
<ul>
<li> To determine if something is listening on port 4333, use: <p>
<pre>
netstat -a | grep 4333
</pre>
If you see output similar to:
<pre>
*.4333 *.* 0 0 0 0 LISTEN
</pre>
then something is using that port. <p>
<li> To see if <tt>msqld</tt> is using the port, use: <p>
<pre>
netstat -f unix
</pre>
Output similar to the following will indicate that <tt>msqld</tt>
is already running: <p>
<pre>
Active UNIX domain sockets
Address Type Vnode Conn Addr
fcf8bca8 stream-ord 231 0 /tmp/msql.sock
</pre>
This may not work for all operating systems. - the above examples
were taken from a Solaris 2.4 system. Variations on this command
include: <p>
<pre>
netstat -f inet
</pre>
or
<pre>
netstat -f local
</pre>
</ul>
</ul>
If you found something using the TCP/IP port that <tt>msqld</tt> would
like to use, examine the output of your operating system's <tt>ps</tt>
command to check if you already have a running <tt>msqld</tt> process.
If you have then shut it down it by executing: <p>
<pre>
msqladmin shutdown
</pre>
If you don't have a running <tt>msqld</tt> process then something else
may be using the port that <tt>msqld</tt> is trying to use. Examine
<tt>/etc/inetd.conf</tt> and <tt>/etc/services</tt> (or the services
NIS map if you're running NIS) to see if anything else is using the
port. The output from one of the <tt>netstat</tt> commands listed
above may be helpful. <p>
If you find such a program you have two options: <p>
<ol>
<li> Change the port number the other program is using so that it
doesn't conflict with mSQL <p>
<li> Ensure that mSQL uses a different port number. This can be done
by either: <p>
<ul>
<li> starting <tt>msqld</tt> with the environment variable
MSQL_TCP_PORT set to another port number. You'll also have
to ensure that client applications use the new port number
too. <p>
<li> modifying the <tt>./src/common/site.h</tt> file and
changing the section
<pre>
/*
** TCP port for the MSQL daemon
*/
#ifdef ROOT_EXEC
#define MSQL_PORT 1112
#else
#define MSQL_PORT 4333
#endif
</pre>
to suit your needs. Then recompile and reinstall mSQL.
</ul>
</ol>
<hr>
<h3><a name="bind-permissions">Why do I see a "<tt>Can't start
server : UNIX Bind : Permission denied</tt>" error message when I
attempt to start <tt>msqld</tt>?</a></h3>
This usually occurs because of a permission problem involving the Unix
domain socket used by
<tt>msqld</tt> when it communicates with processes on the same host as
itself. <p>
Under mSQL version 1.<i>x</i> this file is typically
<tt>/dev/msql</tt> or <tt>/tmp/msql.sock</tt> while under mSQL
version 2.<i>x</i> it is typically <tt>%I/msql2.sock</tt> where
<tt>%I</tt> is a reference to the directory specified by
<tt>Inst_Dir</tt> in the mSQL configuration file. <p>
These permission problems usually involve the socket itself or the
directory in which it resides. The general rule here is that the
directory should have read and write permission for the mSQL root user,
and the socket (or named pipe on some operating systems) should be
owned by the mSQL root user. (<b>Note:</b> The mSQL root user is the
user you specified during the setup stage during the installation of
mSQL version 1.<i>x</i> or the user specified in the
<tt>msql.conf</tt> file for mSQL version 2.<i>x</i>). <p>
Some operating systems, such as HP-UX 10.<i>x</i>, ship with
<tt>dr-xr-xr-x</tt> permissions on <tt>/dev</tt> which makes it
difficult for <tt>msqld</tt> to write to the socket. In these
circumstances a better place for the socket would be
<tt>/var/msql</tt>. <p>
The installation instructions for mSQL 2.<i>x</i> state: <p>
<pre>
8. Ensure that the installation directory (and everything under it)
is owned by the user that mSQL will run as (e.g. the msql user).
To do this, issue a command like "chown -R msql /usr/local/Hughes".
Substitute the correct username and installation directory if
you are running a non-default installation.
</pre>
If you decide to place the mSQL Unix domain socket in one of the
temporary directories such as <tt>/tmp</tt> <tt>/usr/tmp</tt> or
<tt>/var/tmp</tt> please read the section in this FAQ titled
<a href="#socket-location">"Where did my mSQL socket file
go?"</a> <p>
You should also read the section in this FAQ titled
<a href="#socket-location">"Where did my mSQL socket file
go?"</a> if your operating system does not ship with write
permission on <tt>/dev</tt>. <p>
<hr>
<h3><a name="tmpdir">Why do I see "<tt>Couldn't create temporary
table</tt>" error messages?</a></h3>
mSQL uses a temporary area to store the results of table joins while
it is processing a query. This area lives in the directory: <p>
<pre>
msqldb/.tmp
</pre>
under the directory in which you elected to install mSQL. <p>
If the <tt>.tmp</tt> directory does not exist, or doesn't have
permissions that allow the mSQL super user to create files then you'll
see the "<tt>Couldn't create temporary table</tt>" message. <p>
To fix this, check for the existence of the directory and ensure
that it has permissions:
<pre>
drwxr-xr-x 2 <i>owner</i> <i>group</i> 512 Jan 28 16:10 .tmp
</pre>
where <i>owner</i> is the user name of the mSQL super user and
<i>group</i> is whatever is appropriate to the way in which you want to
run your system (in other words it isn't terribly important in this
case). <p>
If you're going to do really big table joins then have a look at the
section in the FAQ titled <a href="#tmp-space">"How can I avoid
running out of space when doing certain complex table joins?"</a>.
<p>
<hr>
<h3><a name="tmp-space">How can I avoid running out of space when doing
certain complex table joins?</a></h3>
Some mSQL operations involving table joins can consume large amounts of
temporary disk space. You can change the location of this temporary
storage area using the following procedure: <p>
<ul>
<li> Shutdown the mSQL database server. <p>
<pre>
msqladmin shutdown
</pre>
<li> Remove the <tt>msqldb/.tmp</tt> directory from your mSQL
installation directory. For example, if you installed mSQL in
<tt>/usr/local/Minerva</tt> run the following command: <p>
<pre>
rm -rf /usr/local/Minerva/msqldb/.tmp
</pre>
<li> Create a symbolic link from a directory with lots of space to
the <tt>msqldb/.tmp</tt> directory: <p>
<pre>
ln -s /<i>lots</i>/<i>of</i>/<i>space</i> /usr/local/Minerva/msqldb/.tmp
</pre>
<li> Restart the mSQL database server.
<pre>
msqld &
</pre>
</ul>
<hr>
<h3><a name="bzero-missing"><tt>msqld</tt> is suddenly dumping core and
complaining about <tt>bzero()</tt></a></h3>
Rasmus Lerdorf writes: <p>
<pre>
This looks to me like you have compiled your msqld binary on a
machine with bzero() in your libc but you are running it on a
machine that does not have the bzero() function in its libc. Could
it be that you compiled on a Solaris 2.5 box, but you are running
it on a Solaris 2.4 machine? Sun made the brilliant decision to add
bzero, bcopy and rindex to the Solaris 2.5 libc which means that
Solaris 2.5 and 2.4 are not completely binary compatible anymore.
When you compile msql on Solaris 2.5 it will see that bzero and
bcopy are available and thus try to use them.
The fix is to either link your msqld statically with the Solaris
2.5 libc, or perhaps more preferable, recompile msql to not use the
silly bzero, bcopy, bcmp and rindex functions.
Edit common/config.h and make sure you do not have HAVE_BCOPY and
HAVE_RINDEX defined. If you do, comment out these definitions and
recompile. The resulting binary should then run on both target
machines.
</pre>
The exact error message you'll see when running a Solaris 2.5 compiled
<tt>msqld</tt> on a Solaris 2.4 machine is: <p>
<pre>
peters@wheel[710] ./msqld
mSQL Server 1.0.10 starting ...
ld.so.1: ./msqld: fatal: relocation error: symbol not found: bzero:
referenced in ./msqld
Killed
</pre>
<hr>
<h3><a name="bsdlib">Why does <tt>relshow</tt> drop the first two
characters from its output?</a></h3>
Desmond writes: <p>
<pre>
Wonder if anyone encountered this weird display while using relshow?
relshow bookmarks
Database = bookmarks
+---------------------+
| Table |
+---------------------+
| okmarks |
| st |
+---------------------+
notice that the first two letters of the table names are missing.
Please help. Thanks in advance!
</pre>
David Hughes replies: <p>
<pre>
I've seen this on Solaris if you link against the oh so broken BSD
compatibility library (libbsd.a). Please make sure that libbsd.a
isn't mentioned in your site.mm file.
</pre>
And from the comp.unix.solaris FAQ: <p>
<pre>
6.19) Why doesn't readdir work? It chops the first two characters of
all filenames.
You're probably linking with libucb and didn't read question
6.18. Readdir in libucb.so wants you to include sys/dir.h,
but many SunOS 4.1.x programs included <dirent.h>,
consequently, you're mixing native <dirent.h> struct dirent
with libucb readdir(). The symptom of this mixup is that the
first two characters of each filename are missing. Make sure
you use the native compiler (default /opt/SUNWspro/bin/cc,
which may not be in your PATH), and not /usr/ucb/cc.
</pre>
If you haven't shelled out the cash for Sun's compiler you can
substitute <tt>gcc</tt> for <tt>/opt/SUNWspro/bin/cc</tt> above. <p>
<hr>
<h3><a name="msqladmin">Why won't <tt>msqladmin</tt> work?</a></h3>
When running <tt>msqladmin</tt> you may occasionally see error
messages: <p>
<pre>
mSQL command failed!
Server error = Permission denied
</pre>
<tt>msqladmin</tt> has the following restrictions: <p>
<ol>
<li> it can only be run by the msql root user. That is the user you
specified when you compiled msql. This is a security feature.
<p>
<li> it can only be run on the machine on which msqld is running -
it will NOT work via tcp/ip connections. This is a security
feature.
</ol>
The exception to the above restrictions is <p>
<pre>
msqladmin version
</pre>
this command can be run by any user, even over a network connection.
<p>
<hr>
<h3><a name="aix-compress">Why won't mSQL work with the compressed file
system under AIX?</a></h3>
It seems that mSQL will corrupt its database files if they are stored
using the compressed file system running under AIX. The reasons are not
yet clear but may be related to AIX's implementation of <tt>mmap()</tt>.
<p>
The corruption can be avoided by ensuring that the database files are
not stored in a compressed file system. <p>
<hr>
<h3><a name="hpux-index">Why do I see "<tt>Protocol mismatch</tt>"
errors under HP-UX?</a></h3>
The following error message: <p>
<pre>
Protocol mismatch. Server Version = 0 Client Version = 6
</pre>
may indicate that the version of <tt>index()</tt> being used is
broken. This is true with some implementations of HP-UX 9.<i>x</i>. <p>
mSQL's <tt>autoconf</tt> build procedure will use <tt>index()</tt> if
it finds it. The fix is to modify: <p>
<pre>
./targets/<i>your_architecture</i>/common/config.h
</pre>
and remove (or comment out) the line that reads: <p>
<pre>
#define HAVE_RINDEX 1
</pre>
Then recompile mSQL. <p>
<hr>
<h3><a name="machten">Why do I see <tt>"Can't start server : UNIX
Bind : Invalid argument"</tt> errors running <tt>msqld</tt> under
a MachTen BSD Unix system?</a></h3>
Mark Murphy <a href="mailto:markm@desktop.tyrell.com">
<markm@desktop.tyrell.com></a> writes: <p>
<pre>
At 12:10 PM 9/17/96, I wrote:
>I'm trying to install mSQL on a MachTen BSD unix system and am having
>problems. The compile and installation went great (with only a warning
>that it could not detect 'uname' on the system). But when I tried to start
>the server from root with:
>
>/usr/local/Minerva/bin/msqld&
>
>I get the following:
>
>Can't start server : UNIX Bind : Invalid argument
>
>Anyone have any suggestions on what I am doing wrong or what is missing?
Thought I'd let everyone know what the problem was in case anyone else is
thinking of using MachTen BSD Unix
There's a bug in the <sys/un.h> file. It reads:
/*
* Definitions for UNIX IPC domain.
*/
struct sockaddr_un {
short sun_family; /* AF_UNIX */
char sun_path[108]; /* path name (gag) */
};
And it should be:
/*
* Definitions for UNIX IPC domain.
*/
struct sockaddr_un {
short sun_family; /* AF_UNIX */
char sun_path[106]; /* path name (gag) */
};
It seems sun_path was a little too long and the call to 'bind' in msqld
does a check on the parameter's structure size... thus giving an invalid
argument error.
On another note....
After I got that bug fixed, the server started, but when exercising the
tests, msql crashed MachTen! YES... I mean crash! So much for protected
memory!
But the real problem is yet another bug with MachTen.
It seems MachTen's mmap function "has not been fully
tested" (as one tech support person finally admitted). So
while mmap exists, it really doesn't work.
Borrowing from the msql FAQ:
>Version 1.3 or greater of the Linux operating system has full mmap support.
>If you're using such a version of Linux, mSQL will work perfectly well using
>mmap.
>
>If you have an earlier version of Linux you can either upgrade or ensure that
>mmap support in mSQL is disabled by running the 'setup' program and then
>editing
>
> ./<i>targets/your-architecture</i>/site.mm
>
>and ensuring the mmap directive reads:
>
> MMAP=
>
>and then recompile the mSQL package.
This also works for MachTen since it seems mmap is "not fully tested"...
and in reality it damn well crashed the machine.
These two issues took two full days to resolve.... with calls to Tenon tech
support in the morning, suggestions that were nowhere near fixing the
problem during the day... and the "real" answers coming near 5pm when tech
support closes... that these are bugs in MachTen.
While their tech support staff was always nice and tried to be very
helpful, I wish they would have been able to answer my questions when I
first called. It would have saved me two days of work on these issues.
They had me try all kinds of things until the call was elevated to another
tech (he doesn't get in until late afternoon) who had the answers... it's a
MachTen bug!
Very frustrating.
However on a positive point, MachTen has been running very good as my
internet server for the past six months or so without a glitch.
</pre>
<hr>
<h3><a name="socket-location">Where did my mSQL socket file
go?</a></h3>
Consider these two scenarios: <p>
<ol>
<li> Your machine has just been rebooted and suddenly applications
running on the same host cannot connect to <tt>msqld</tt>. After
some investigation you discover that <tt>/tmp/msql.sock</tt> has
been removed - why? <p>
<li> Your mSQL database server has been running fine for a week or
so and suddenly applications running on the same host cannot
connect to <tt>msqld</tt>. After some investigation you discover
that <tt>/tmp/msql.sock</tt> has been removed - why?
</ol>
<p>
You've probably been bitten by an operating feature and/or some good
system administration practise. Firstly some background. <p>
The two classic temporary areas under most flavours of Unix are
<tt>/tmp</tt> and <tt>/usr/tmp</tt> (<tt>/var/tmp</tt> in some
systems). They are usually on different file systems but don't have to
be. <p>
Under some versions of Unix, <tt>/tmp</tt> is cleared whenever the
system is rebooted. Other versions don't do this. Most versions of Unix
do NOT clear <tt>/usr/tmp</tt> on reboot. <p>
Some operating systems - such as Solaris 2.<i>x</i> and SunOS
4.<i>x</i> under certain configurations - take advantage of unused
portions of the swap partition to provide <tt>/tmp</tt>. (This happens
by default under Solaris 2.<i>x</i> and can be turned on using the
TMPFS file system under SunOS 4.<i>x</i>). Because this area is not a
real file system <tt>/tmp</tt> only has a transient lifetime and is
guaranteed to be empty after each reboot. <p>
While the system is running, some versions of Unix regularly clear
<tt>/tmp</tt> and possibly <tt>/usr/tmp</tt> of files older than some
arbitrary period (usually a few days or more). This procedure is
handled by <tt>root</tt> via <tt>cron</tt>. Some versions of Unix are
shipped with a <tt>root</tt> crontab to perform this cleanup, others
aren't. Often the entry in crontab is draconian enough to remove
everything older than the required period - including directories,
named pipes, sockets etc. Other entries will only remove files. In is
not unusual for system administration staff to add a similar entry to
<tt>root</tt>'s crontab if it doesn't already exist. <p>
So what this boils down to is that files in <tt>/tmp</tt> and
<tt>/usr/tmp</tt> (<tt>/var/tmp</tt>) are <b>TEMPORARY</b> and should
be treated as such. If you need to create a socket for mSQL you should
follow these simple rules: <p>
<ol>
<li> If <tt>root</tt> is your mSQL master user, the socket should
go in <tt>/dev</tt>. This happens by default under both mSQL version
1.<i>x</i> and 2.<i>x</i>. <p>
However some operating systems such as HP-UX 10.<i>x</i> ship with
<tt>dr-xr-xr-x</tt> permissions on <tt>/dev</tt>. In this case,
you should choose a different location entirely for the mSQL Unix
domain socket. <tt>/var/msql</tt> is one possible choice. <p>
For both mSQL version 1.<i>x</i> and 2.<i>x</i> this can be
accomplished by editing: <p>
<pre>
./targets/<i>your-architecture</i>/site.h
</pre>
and modifying the value of
<pre>
#define MSQL_UNIX_ADDR "/dev/msql"
</pre>
for mSQL version 1.<i>x</i>, or
<pre>
#define MSQL_UNIX_ADDR "/dev/msql2"
</pre>
for mSQL version 2.<i>x</i>. <p>
Then re-compile. <p>
<li> If <tt>root</tt> is not your mSQL master user, the socket
should go in a directory that the mSQL master user can read/write
but not one of the temporary directories <tt>/tmp</tt>,
<tt>/usr/tmp</tt> or <tt>/var/tmp</tt>. <p>
<ul>
<li> For both mSQL version 1.<i>x</i> and 2.<i>x</i> this can
be accomplished by editing
<pre>
./targets/<i>your-architecture</i>/site.h
</pre>
and modifying the value of
<pre>
#define MSQL_UNIX_ADDR "/tmp/msql.sock"
</pre>
Then re-compile. <p>
<li> For mSQL version 1.<i>x</i> you can also start
<tt>msqld</tt> with the environment variable
<b>MSQL_UNIX_PORT</b> set to the new location of the mSQL
socket. There is no need to recompile in this case. You will
have to ensure that this environment variable is set for ALL
programs that wish to communicate with <tt>msqld</tt> -
including <tt>msql</tt>, <tt>msqladmin</tt>, <tt>relshow</tt>,
<tt>MsqlPerl</tt>, etc etc. <p>
<li> For mSQL 2.<i>x</i> you can also edit the mSQL config file
<pre>
msql.conf
</pre>
and change the value of
<pre>
UNIX_PORT
</pre>
By default this is <tt>%I/msql2.sock</tt> where <tt>%I</tt> is
the directory in which you installed mSQL 2.<i>x</i>. There is
no need to recompile in this case.
</ul>
</ol>
<p>
<hr>
<h3><a name="slow-connections">Why does it take such a long time to
connect to the mSQL database server?</a></h3>
Sometimes you may have difficulty in connecting to the mSQL database
server - <tt>msqld</tt>. <p>
<tt>msqld</tt> is a single threaded application and therefore can only
deal with one SQL query at a time. If <tt>msqld</tt> is busy servicing
an SQL query you may not be able to make another connection until the
SQL query has finished. mSQL version 1.<i>x</i> is extremely inefficient
in performing table joins. So an SQL query with only a single table
join may take many minutes to complete. <p>
There is no solution to this problem in mSQL version 1.<i>x</i>. The
only possible workaround is to ensure that your database schema is
designed in such a way as to avoid table joins at all costs. <p>
Table joins are much more efficient under mSQL version 2.<i>x</i> so
the problem will rarely be encountered. <p>
<hr>
<h3><a name="beta-expire">Why do I see <tt>"This Beta test release
expires in 57 days"</tt> when I start <tt>msql2d</tt>?</a></h3>
The current releases of mSQL version 2.<i>x</i> are beta versions. By
their very nature, beta versions are still in development. Hughes
Technologies has released the beta versions in an attempt to leverage
off the existing user base in order to do final testing and bug
fixing. <p>
The expiration messages are reminders to the users of the beta version
that Hughes Technologies expects to have either a new beta version or
a completed version released within the time limit suggested by the
message. <p>
If the time limit has elapsed, <tt>msql2d</tt> will cease to operate
and you will be presented with a message: <p>
<pre>
This Beta test release has expired!
Check out www.Hughes.com.au for a new release!
</pre>
This site has a few problems at present. Use
<a href="http://hughes.com.au">http://hughes.com.au</a>
instead. <p>
If a new version of mSQL 2.<i>x</i> (beta or otherwise) is not
available after the time limit has expired, it is a simple matter
to disable this feature using one of the patches listed below. Once
you have applied the patch you MUST recompile and re-install. There is
no need to recompile any third party applications as this patch only
affects the operations of the database server. <p>
To avoid conflicts with mismatched whitespace,
<a href="#how-to-patch">apply</a> the patch using the
"<tt>-l</tt>" option of <tt>patch</tt>.
(<i>That's an "el", NOT a "one" or an
"eye"</i>). <p>
<ul>
<li> mSQL 2.0B1 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c.orig Mon Dec 16 19:45:33 1996
--- src/msql/msqld.c Wed Apr 30 10:08:49 1997
***************
*** 583,589 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (850703170 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
--- 583,589 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B2 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c.orig Wed Apr 30 09:57:54 1997
--- src/msql/msqld.c Wed Apr 30 10:11:37 1997
***************
*** 591,597 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (850703170 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
--- 591,597 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B3 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c.orig Wed Apr 30 09:57:54 1997
--- src/msql/msqld.c Wed Apr 30 10:11:48 1997
***************
*** 595,601 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (851999170 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
--- 595,601 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B4 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c.orig Wed Apr 30 09:57:54 1997
--- src/msql/msqld.c Wed Apr 30 10:11:58 1997
***************
*** 600,606 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (854763970 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
--- 600,606 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 91*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Snapshot release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B5 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c.orig Wed Apr 30 09:57:54 1997
--- src/msql/msqld.c Wed Apr 30 10:12:08 1997
***************
*** 651,657 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (858088800 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
--- 651,657 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B6 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c.orig Wed Apr 30 09:57:54 1997
--- src/msql/msqld.c Wed Apr 30 10:12:17 1997
***************
*** 696,702 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (858088800 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
--- 696,702 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B7 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c Mon May 12 17:35:02 1997
--- src/msql/msqld.c.orig Thu May 8 11:54:23 1997
***************
*** 696,702 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
--- 696,702 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (863060000 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
</font>
</pre>
<li> mSQL 2.0B7.1 <p>
<pre>
<font size="-1">
*** src/msql/msqld.c Mon May 12 17:35:08 1997
--- src/msql/msqld.c.orig Thu May 8 11:54:23 1997
***************
*** 696,702 ****
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (999999999 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
--- 696,702 ----
chdir(msqlHomeDir);
cleanTmpDir();
! timeRemain = (863060000 + 60*24*60*60) - time(NULL);
if (timeRemain < 0)
{
printf("\nThis Beta test release has expired!\n");
</font>
</pre>
</ul>
<hr>
<h3><a name="acl-ips">Can I use IP addresses in the mSQL ACL file?</a></h3>
Yes. <p>
I. Chazakis <a href="mailto:ioannis@acropolis.net">
<ioannis@acropolis.net></a> reports: <p>
<pre>
I've been using ip addresses in acl files since day one, without
any problems in version 1.xx, so I guess it should work for you as
well.
</pre>
<hr>
<h3><a name="protocol-mismatch">What does the "Protocol mismatch.
Server Version = 22 Client Version = 6" error mean?</a></h3>
Messages similar to this mean that your client software is attempting
to connect to an mSQL database server which is running a different
version of the mSQL protocol. This could be a result of an old client
attempting to talk to a new server or a new client attempting to talk
to an old server. <p>
The numbers mentioned in the message give an indication of which
versions of mSQL each end of the session is using. In the example
given, the client was compiled with mSQL version 1.<i>x</i>
(specifically 1.0.16) because the protocol version is less than 10, and
the server is mSQL version 2.<i>x</i> because the protocol version is
greater than 20. <p>
This problem can be rectified by recompiling your third party mSQL code
(that is any client code that did NOT come with the mSQL distribution,
including software such as MsqlPerl etc) against the latest version of
mSQL available to you. <p>
Also see the section in the FAQ titled <a href="#recompile">"I've
just installed the latest version of mSQL and now my own applications
won't work!"</a>. <p>
<hr>
<h3><a name="query-ordering">Why does mSQL take longer to return the
same results when I change the order of my query?</a></h3>
Michael Wiedmer <a href="mailto:mwiedmer@eso.org">
<mwiedmer@eso.org></a> writes: <p>
<pre>
mSQL behaves like a charm - mostly. That is, depending on the ordering
of the tables in the FROM clause of a SELECT query, mSQL will return
the results in different time scales - if at all!
These two SELECT queries only differ in the FROM clause. You will
notice that the "component" table comes last and first, respectively.
SELECT component.location
FROM instrument, has_dpr, data_product, component
WHERE instrument.ins_id LIKE 'SUSI'
AND instrument.ins_id = has_dpr.comp_id
AND has_dpr.dpr_id = data_product.dp_id
AND component.comp_id = data_product.comp_id
AND data_product.type = 'PRG'
SELECT component.location
FROM component, instrument, has_dpr, data_product
WHERE instrument.ins_id LIKE 'SUSI'
AND instrument.ins_id = has_dpr.comp_id
AND has_dpr.dpr_id = data_product.dp_id
AND component.comp_id = data_product.comp_id
AND data_product.type = 'PRG'
In version 1.0.16, the latter fails miserably (it returns after 5
minutes or so), whereas the former completes the query correctly
within seconds.
In version 2.0 beta 6, the latter returns after 30 seconds, whereas
the former completes the query wrongly!!
Could you tell me whether this is a known feature and whether there
are any workarounds or fixes? Of course, I'd gladly be informed of any
nonsense in my queries.
</pre>
Robert Sum <a href="mailto:sumrn@crd.ge.com"> replies: <p>
<sumrn@crd.ge.com></a>
<pre>
A two part answer:
Part 1. Neither version of mSQL has a particularly aggressive
optimiser and they default to following the FROM and WHERE lines in
the order in which they are entered while performing the query.
Joins generally result in the formation of temporary tables (on the
disk); consequently, they are highly sensitive to the amount of
data processed. If the order of the query is such that the
temporary tables are large (i.e., the first clauses to be processed
don't reduce the overall amount of data by much), then it will be
slower. Therefore, if one knows what tables and clauses will
result in the smallest sizes for intermediate results, a query
written with those tables and clauses considered first will run
faster than other possible queries. Though not apparent in these
examples, some versions of mSQL 2.0 Bx also have a glitch in the
query mechanism that causes extra parenthesis to generate extra
temporary tables. So, it is best to use parentheses only when
necessary. (mSQL 1.x does not do parentheses.) Finally, there is
an initialisation overhead whenever a table must be read/mapped
into memory which will often cause the first time a query is
executed to be slower than succeeding times, provided that
preceding queries have not used the same tables.
Part 2. Each of mSQL 1.x and 2.0 Bx have various bugs in their
LIKE operations: one of them being the ability to run off the end
of the data into mismatch and core-dump lands. While trying not to
blow my own horn, the mailing list archives have my patches that
fix most the problems. However, the use of a bug-free LIKE in
these specific examples would only be a performance penalty
because "LIKE 'SUSI'" is the same as "= 'SUSI'".
</pre>
<hr>
<h3><a name="multi-table-selects">Why don't my SELECT statements work
across multiple tables?</a></h3>
Jonathan Loh <a href="mailto:jloh@netjet.com">
<jloh@netjet.com></a> writes: <p>
<pre>
I'm trying to do a join and each time it gives me an error.
select * from t1,t2 where t1.key=t2.key
This always gives me:
Reference to un-selected table ""
I'm using the 1.0.16 version
</pre>
Chris Lambrou <a href="mailto:chrislambrou@internetmci.com">
<chrislambrou@internetmci.com></a> replies: <p>
<pre>
There's one I've never seen! Try this instead:
select t1.*, t2.* from t1,t2 where t1.key=t2.key
</pre>
And Joshua Kugler <a href="mailto:jkugler@inreach.com">
<jkugler@inreach.com></a> also replies: <p>
<pre>
I found it in the UMBC mSQL Tutorial, at
<a href="http://www.cs.umbc.edu/~finin/461/msql">http://www.cs.umbc.edu/~finin/461/msql</a>:
Minor limitation: can't use "SELECT *" over multiple tables
In mSQL's SELECT you can not use * for the fields you want in the
answer if there are two or more tables involved. Note that this
limitation does not reduce the "expressive power" of mSQL
but it is somewhat annoying. Here is an example. Suppose we define
T1 and T2 as:
create table t1 (a int, b int)
create table t2 (b int, c int)
insert into t1 values (1,2)
insert into t2 values (2,3)
Then these queries generate errors:
mSQL > select * from t1, t2 where t1.b=t2.b \g
ERROR : Reference to un-selected table ""
mSQL > select * from t1,t2 \g
ERROR : Reference to un-selected table ""
But explicitly specifying the fields to return works:
mSQL > select t1.a,t1.b,t2.b,t2.c from t1, t2 \g
+----------+----------+----------+----------+
| a | b | b | c |
+----------+----------+----------+----------+
| 1 | 2 | 2 | 3 |
+----------+----------+----------+----------+
mSQL > select t1.a,t1.b,t2.c from t1, t2 where t1.b=t2.b \g
+----------+----------+----------+
| a | b | c |
+----------+----------+----------+
| 1 | 2 | 3 |
+----------+----------+----------+
</pre>
<hr>
<hr width="75%">
<center>
<h2><a name="how-do-i">How do I ...?</a></h2>
</center>
<h3><a name="single-quotes">How do I embed single quotes in a
field?</a></h3>
To handle a single quote, escape it with a backslash character. So the
string <p>
<pre>
'Bambi's'
</pre>
would be entered as <p>
<pre>
'Bambi\'s'.
</pre>
<b>Note:</b> This applies when using
<a href="#support-progs"><tt>msql</tt></a> - the database monitor
program. If you're developing your own application you may have to
escape other characters that are special to the language you're using -
for example perl, C or tcl. <p>
<hr>
<h3><a name="escape-chars">What other characters need special
treatment?</a></h3>
When specifying table or field names or when inserting values into
fields, the only other character that requires special handling is the
mSQL escape character backslash. To handle a backslash, escape it with
another backslash. So the string <p>
<pre>
c:\windows\system\
</pre>
would be entered as <p>
<pre>
'c:\\windows\\system\\'
</pre>
When using regular expressions in queries of the form: <p>
<pre>
SELECT table.column FROM table WHERE table.column LIKE 'regexp'
</pre>
the following rules apply: <p>
<center>
<table border=3 cellpadding=3 bgcolor="#cccccc">
<tr>
<th colspan=6>
Use this table for mSQL versions 1.0.13 and below
</th>
</tr>
<tr>
<th>
To search for<br>
this character
</th>
<th>
Use this<br>
string
</th>
<th>
or this<br>
string
</th>
<th>
To search for<br>
this character
</th>
<th>
Use this<br>
string
</th>
<th>
or this<br>
string
</th>
</tr>
<tr>
<td align=center>
$
</td>
<td align=center>
\\\\$
</td>
<td align=center>
[$]
</td>
<td align=center>
[
</td>
<td align=center>
\\\\[
</td>
<td align=center>
[[]
</td>
</tr>
<tr>
<td align=center>
%
</td>
<td align=center>
\\%
</td>
<td align=center>
[%]
</td>
<td align=center>
\
</td>
<td align=center>
\\\\\\\\
</td>
<td align=center>
[\\\\]
</td>
</tr>
<tr>
<td align=center>
'
</td>
<td align=center colspan=2>
\'
</td>
<td align=center>
^
</td>
<td align=center>
\\\\^
</td>
<td align=center>
[^]
</td>
</tr>
<tr>
<td align=center>
(
</td>
<td align=center>
\\\\(
</td>
<td align=center>
[(]
</td>
<td align=center>
_
</td>
<td align=center colspan=2>
\\_
</td>
</tr>
<tr>
<td align=center>
)
</td>
<td align=center>
\\\\)
</td>
<td align=center>
[)]
</td>
<td align=center>
|
</td>
<td align=center>
\\\\|
</td>
<td align=center>
[|]
</td>
</tr>
<tr>
<td align=center>
?
</td>
<td align=center>
\\\\?
</td>
<td align=center>
[?]
</td>
</tr>
</table>
</center>
<p>
<center>
<table border=3 cellpadding=3 bgcolor="#cccccc">
<tr>
<th colspan=4>
Use this table for mSQL versions 1.0.14 and above
</th>
</tr>
<tr>
<th>
To search for<br>
this character
</th>
<th>
Use this<br>
string
</th>
<th>
To search for<br>
this character
</th>
<th>
Use this<br>
string
</th>
<tr>
<td align=center>
$
</td>
<td align=center>
[$]
</td>
<td align=center>
[
</td>
<td align=center>
[[]
</td>
</tr>
<tr>
<td align=center>
%
</td>
<td align=center>
[\\%]
</td>
<td align=center>
\
</td>
<td align=center>
<i>cannot be searched</i>
</td>
</tr>
<tr>
<td align=center>
'
</td>
<td align=center>
\'
</td>
<td align=center>
^
</td>
<td align=center>
<i>cannot be searched</i>
</td>
</tr>
<tr>
<td align=center>
(
</td>
<td align=center>
[(]
</td>
<td align=center>
_
</td>
<td align=center>
\\_
</td>
</tr>
<tr>
<td align=center>
)
</td>
<td align=center>
[)]
</td>
<td align=center>
|
</td>
<td align=center>
[|]
</td>
</tr>
<tr>
<td align=center>
?
</td>
<td align=center>
[?]
</td>
<td align=center>
]
</td>
<td align=center>
[]]
</td>
</tr>
</table>
</center>
<p>
<b>Note:</b> This applies when using
<a href="#support-progs"><tt>msql</tt></a> - the database monitor
program. If you're developing your own application you may have to
escape other characters that are special to the language you're using -
for example perl, C or tcl. <p>
If you are using mSQL via web interfaces, you may wish to use special
HTML characters instead. For example, a single quote can be
represented as: <p>
<pre>
&#39;
</pre>
A complete list of the HTML coded characters can be found at: <p>
<pre>
<a href="http://www.w3.org/pub/WWW/MarkUp/html-spec/html-spec_13.html">http://www.w3.org/pub/WWW/MarkUp/html-spec/html-spec_13.html</a>
</pre>
While we're on the topic of regular expressions, this explanation from
Robert Sum <a href="mailto:sumrn@crd.ge.com">
<sumrn@crd.ge.com></a> may shed some light on what
happens inside mSQL: <p>
Robert writes: <p>
<pre>
In mSQL 1.0.x, any time you use LIKE, you use an unusual form of
"regular expressions" which are the way they are because of some
historical implementation decisions that, in retrospect, were,
perhaps, not the right ones. Consequently, mSQL 1.0.x does the
following for a LIKE pattern which is somewhere between globbing
and full regular expressions:
1. it tries to force a match of the whole data string by implicitly
prepending the pattern with the beginning-of-pattern operator ^
and appending the end-of-pattern operator $ to the pattern
(which makes the use/non-use of these operators a little quirky
[see below]),
2. it does NOT allow the ., *, and + regexps (they are plain characters),
3. it does allow character classes using [] (i.e., any single
character within the [] is matched unless the first char is ^ in
which case any single character not in the [] is matched),
4. it does allow alternation using |,
5. it does allow grouping using (),
6. it does allow optional characters or groups using ?,
7. it allows _ to represent any single character (what would
ordinarily be the . above),
8. it allows % to represent any string of characters (what would
ordinarily be the combination .*),
As you can derive from above, the characters
^, $, [, ], |, (, ), ?, _, %, \
are all special in one way or another. There is a way to search for
everything, it just might not be completely obvious. For instance,
using the msql program, one can use
\\_ to match _
\\% to match %
\\^ to match ^
\\$ to match $
\\\\ to match \
Basically, there are three places where \ is used as the escape
character:
1. The msql program (always treats \ as an escape character),
2. The translation process (treats \ as an escape only when
followed by % or _), and
3. The regular expression evaluator (always treats \ as an escape
character).
In the first two examples above, steps 1 and 2 strip backslashes.
In the next three examples, steps 1 and 3 strip backslashes.
Things are actually a bit more consistent than folks realize, I
think. (Note: If you are using Perl or Tcl or some such, then
replace 1. with appropriate activity of that application.)
Furthermore, a recent message asked about
SELECT * FROM doc_info
WHERE foo LIKE 'x' or foo LIKE 'y' or foo LIKE 'z'
and bar LIKE 'a' or bar LIKE 'b' or bar LIKE 'c'
to which I replied, try
SELECT * FROM doc_info
WHERE foo LIKE '(x)|(y)|(z)'
AND bar LIKE '(a)|(b)|(c)'
Well, I forgot about rule number 1. above, which means this
conversion may not be quite right and the original sender may need
to fudge things a bit using either an additional set of parenthesis
to force a match of the whole data string as in
SELECT * FROM doc_info
WHERE foo LIKE '((x)|(y)|(z))'
AND bar LIKE '((a)|(b)|(c))'
or if he really wants a match anywhere within the string
SELECT * FROM doc_info
WHERE foo LIKE '$|(x)|(y)|(z)|^'
AND foo <> ''
AND bar LIKE '$|(a)|(b)|(c)|^'
AND bar <> ''
then this should work, but as noted, one must be careful about the
empty string. (If you want the empty string, just leave out the
not equal clauses.)
</pre>
<hr>
<h3><a name="null-fields">How do I handle null fields?</a></h3>
For the NULL values, just use the NULL keyword. <p>
For example <p>
<pre>
insert into foo values ( NULL, 1, 2, 'some text' )
</pre>
<hr>
<h3><a name="no-case">How do I perform case insensitive
matches?</a></h3>
mSQL uses Henry Spencer's regular expression library with a few
modifications. To perform case insensitive searches, your query should
take the form <p>
<pre>
SELECT * FROM my_table WHERE my_field LIKE '[Ss][Oo][Mm][Ee]
[Vv][Aa][Ll][Uu][Ee]'
</pre>
Sol Katz's <a href="mailto:skatz@blm.gov"><skatz@blm.gov></a>
<a href="#oo-html">Object Oriented HTML API</a> includes a C routine
that converts a string into its case insensitive form. You may wish to
use this in any C code that you write. See the section below on
<a href="#other-apps">"Contributed Code and Third Party
Applications"</a> <p>
Alternatively, you can create an additional field in each table that
will hold a single case version of the information you are likely to be
searching for. <p>
For perl users, Michael Cowden
<a href="mailto:cowden@leithaus.leitess.com">
<cowden@leithaus.leitess.com></a> has contributed this code
example: <p>
<pre>
The following statement turns mSQL into [mM][sS][qQ][lL]
$string = "mSQL";
$string =~ s/(.)/\[\L$1\E\U$1\E\]/g;
</pre>
Vivek Khera
<a href="mailto:khera@kci.kciLink.com"><khera@kci.kciLink.com></a>
suggests a simpler method for perl users: <p>
<pre>
Personally, I use this in Perl, as there is no need to complicate
the regular expression with non-alpha characters.
$string =~ s/([A-Za-z])/\[\L$1\U$1\]/gi;
</pre>
Rasmus Lerdorf's
<a href="mailto:rasmus@vex.net"><rasmus@vex.net></a>
<a href="#php">Personal Home Page Construction Kit</a> includes built
in operations for case insensitive searches by way of its
<tt>msql_RegCase(string)</tt> command. <p>
Version 2 of mSQL will support functions similar to <tt>upper()</tt>
and <tt>lower()</tt> which will obviate the need for the above. <p>
<hr>
<h3><a name="add-column">How do I add a column to an existing
table?</a></h3>
You can't! Once a table is created it must stay the way it is. <p>
One possible solution is to use
<a href="#support-progs"><tt>msqldump</tt></a> to create an ASCII dump
of the entire database. Then edit this dump file by hand and add the
extra field to the CREATE clause. You'll also need to edit each INSERT
clause to ensure that the new field is referenced. Once you've
modified the dump file, drop and recreate the database using
<a href="#support-progs"><tt>msqladmin</tt></a> and re-populate the new
database using the dump file and
<a href="#support-progs"><tt>msql</tt></a>. <p>
This procedure could be automated by a shell or perl script. <p>
<b>Note:</b> Use the <tt>-c</tt> option to
<a href="#support-progs"><tt>msqldump</tt></a> to ensure that a
complete dump of the table is produced. <p>
As an example consider this output from
<a href="#support-progs"><tt>msqldump</tt></a>
<pre>
#
# mSQL Dump (requires mSQL-1.0.6 or better)
#
# Host: localhost Database: test
#--------------------------------------------------------
#
# Table structure for table 'test'
#
CREATE TABLE test (
name CHAR(40),
num INT
) \g
#
# Dumping data for table 'test'
#
INSERT INTO test VALUES ('item 999',999)\g
...
INSERT INTO test VALUES ('item 0',0)\g
</pre>
If you wish to insert a field, say "discount", then you will
need to modify the dump file as follows: <p>
<pre>
#
# mSQL Dump (requires mSQL-1.0.6 or better)
#
# Host: localhost Database: test
#--------------------------------------------------------
#
# Table structure for table 'test'
#
CREATE TABLE test (
name CHAR(40),
num INT,
discount REAL
) \g
#
# Dumping data for table 'test'
#
INSERT INTO test VALUES ('item 999',999,0.0)\g
...
INSERT INTO test VALUES ('item 0',0,0.0)\g
</pre>
<b>Notice</b> that every insert clause MUST be changed as well as the
table definition. <p>
<hr>
<h3><a name="parent-child">When should I call <tt>msqlConnect()</tt> in
a parent/child situation?</a></h3>
If both the parent and child processes want to talk to the mSQL server
then you must call <tt>msqlConnect()</tt> <b>AFTER</b> you fork. They
mustn't share the same socket. <p>
<hr>
<h3><a name="reserved-words">Can I use mSQL reserved words as field or
table names?</a></h3>
No. The mSQL parser gets very confused if you attempt to use reserved
words as the name of a table or field. The full list of reserved words
for both version 1.<i>x</i> and 2.<i>x</i> (as obtained from
<tt>msql_lex.c</tt>) is: <p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th colspan=8>
Reserved words in mSQL 1.<i>x</i>
</th>
</tr>
<tr>
<td><</td>
<td>>=</td>
<td>by</td>
<td>distinct</td>
<td>integer</td>
<td>not</td>
<td>real</td>
<td>update</td>
</tr>
<tr>
<td><=</td>
<td>all</td>
<td>char</td>
<td>drop</td>
<td>into</td>
<td>null</td>
<td>select</td>
<td>values</td>
</tr>
<tr>
<td><></td>
<td>and</td>
<td>create</td>
<td>from</td>
<td>key</td>
<td>or</td>
<td>set</td>
<td>where</td>
</tr>
<tr>
<td>=</td>
<td>as</td>
<td>delete</td>
<td>insert</td>
<td>like</td>
<td>order</td>
<td>smallint</td>
</tr>
<tr>
<td>></td>
<td>asc</td>
<td>desc</td>
<td>int</td>
<td>limit</td>
<td>primary</td>
<td>table</td>
</tr>
</table>
</center>
<p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<th colspan=10>
Reserved words in mSQL 2.0B6
</th>
</tr>
<tr>
<td>
<
</td>
<td>
all
</td>
<td>
by
</td>
<td>
delete
</td>
<td>
insert
</td>
<td>
limit
</td>
<td>
on
</td>
<td>
select
</td>
<td>
sum
</td>
<td>
update
</td>
</tr>
<tr>
<td>
<=
</td>
<td>
and
</td>
<td>
char
</td>
<td>
desc
</td>
<td>
int
</td>
<td>
max
</td>
<td>
or
</td>
<td>
sequence
</td>
<td>
table
</td>
<td>
value
</td>
</tr>
<tr>
<td>
<>
</td>
<td>
as
</td>
<td>
clike
</td>
<td>
distinct
</td>
<td>
integer
</td>
<td>
min
</td>
<td>
order
</td>
<td>
set
</td>
<td>
text
</td>
<td>
values
</td>
</tr>
<tr>
<td>
=
</td>
<td>
asc
</td>
<td>
count
</td>
<td>
drop
</td>
<td>
into
</td>
<td>
money
</td>
<td>
primary
</td>
<td>
slike
</td>
<td>
time
</td>
<td>
where
</td>
</tr>
<tr>
<td>
>
</td>
<td>
avg
</td>
<td>
create
</td>
<td>
from
</td>
<td>
key
</td>
<td>
not
</td>
<td>
real
</td>
<td>
smallint
</td>
<td>
uint
</td>
</tr>
<tr>
<td>
>=
</td>
<td>
avl
</td>
<td>
date
</td>
<td>
index
</td>
<td>
like
</td>
<td>
null
</td>
<td>
rlike
</td>
<td>
step
</td>
<td>
unique
</td>
</tr>
</table>
</center>
<p>
Remember that mSQL reserved words are case insensitive so UPPER case or
MiXeD cAsE reserved words are also forbidden in table or field names.
<p>
<hr>
<h3><a name="maxmin">How do I find the maximum or minimum value in a
table?</a></h3>
To obtain the maximum value use: <p>
<pre>
SELECT number FROM table ORDER BY number DESC LIMIT 1
</pre>
To obtain the minimum value use: <p>
<pre>
SELECT number FROM table ORDER BY number LIMIT 1
</pre>
This will only work with mSQL 1.0.9 and above unless you have applied
the unofficial LIMIT patch to earlier versions. See the
<a href="#list-archives">mSQL mailing list archives</a> for details on
this patch. (Before searching for this unofficial patch, you should
seriously consider upgrading to the
<a href="#current-version">latest</a> version of mSQL). <p>
<b>Note:</b> Rasmus Lerdorf writes: <p>
<pre>
The LIMIT statement limits the number of records actually
transferred from the server to the client. It doesn't limit the
scope of the search at all in any way. That means that if you are
looking for the maximum value in a table with 30,000 entries, the
query will first build the entire sorted result in memory in the
server, but when it comes time to transferring the result to the
client, it only sends the first item.
In many cases, especially when you have a lot of fields, or long
fields, the time it takes to transfer the data from the server to
the client is actually many times that of the actual search. And
the msqld daemon is tied up and not available to other clients
while it is wasting time sending result records that will never be
used. So, if you do queries and you know you will only be looking
at the first couple of them, you should use the limit clause and
cut down on the amount of useless records being sent across the
socket.
</pre>
<hr>
<h3><a name="schema">How can I determine the structure of a database?</a></h3>
Use the <a href="#support-progs"><tt>relshow</tt></a> application that
comes bundled with the mSQL software distribution. <p>
<ul>
<li> To discover which databases are available use: <p>
<pre>
relshow
</pre>
or <p>
<pre>
relshow -h <i>host</i>
</pre>
This will return output similar to: <p>
<pre>
+-----------------+
| Databases |
+-----------------+
| test |
| photos |
| patches |
+-----------------+
</pre>
<li> To discover which tables are contained within a database use: <p>
<pre>
relshow <i>dbname</i>
</pre>
or <p>
<pre>
relshow -h <i>host</i> <i>dbname</i>
</pre>
This will return output similar to: <p>
<pre>
Database = test
+---------------------+
| Table |
+---------------------+
| test_table |
| addresses |
| telephone |
+---------------------+
</pre>
<li> To discover the structure of a particular table use: <p>
<pre>
relshow <i>dbname</i> <i>tablename</i>
</pre>
or <p>
<pre>
relshow -h <i>host</i> <i>dbname</i> <i>tablename</i>
</pre>
This will return output similar to: <p>
<pre>
Database = test
Table = test_table
+-----------------+----------+--------+----------+-----+
| Field | Type | Length | Not Null | Key |
+-----------------+----------+--------+----------+-----+
| name | char | 40 | N | N |
| num | int | 4 | N | N |
+-----------------+----------+--------+----------+-----+
</pre>
</ul>
<hr>
<h3><a name="reconnect">What happens when the mSQL server goes down
between requests?</a></h3>
If the mSQL database server process,
<a href="#support-progs"><tt>msqld</tt></a>, dies and is subsequently
restarted, or the host on which it was running is rebooted, any
processes that were connected to the mSQL database server MUST be
reconnected. This is not unique to mSQL, the Oracle database server
behaves in a similar manner. <p>
Programs that were connected to the mSQL database server should be
either restarted or have some internal mechanism whereby they notice
the server has died and attempt a reconnection. <p>
One possible method for checking the status of the database server
would be to examine the return status of the
<a href="#api"><tt>msqlSelectDB()</tt></a> call. <p>
<hr>
<h3><a name="muli-servers">Can I run more than one copy of
<tt>msqld</tt> on the same CPU?</a></h3>
Steve A. Olson writes: <p>
<pre>
I'm looking for a way to provide the full 25 connections to each of
many mSQL databases running on a single box. Here's an idea, will
it work? or is there a better way?
(korn shell example)
$ export MSQL_TCP_PORT=3000; msqld
$ export MSQL_TCP_PORT=3001; msqld
$ export MSQL_TCP_PORT=3002; msqld
Then connect to the database as follows:
$ export MSQL_TCP_PORT=3000; msql db_a
While the above runs, another user connects:
$ export MSQL_TCP_PORT=3001; msql db_b
</pre>
David Hughes replies: <p>
<pre>
Well, sort of. By running 'msql db_a' you are using the local UNIX
socket not the TCP socket so you'd have to use MSQL_UNIX_PORT not
MSQL_TCP_PORT.
The other thing is that you should run 3 MSQL_HOME areas
(/usr/local/Minerva for example). If two of these servers __ever__
access the same database at the same time then you are stuffed.
So, something like
export MSQL_UNIX_PORT=/dev/msql_1; export MSQL_HOME=/Minerva1; msqld&
export MSQL_UNIX_PORT=/dev/msql_2; export MSQL_HOME=/Minerva2; msqld&
and
export MSQL_UNIX_PORT=/dev/msql_1; msql db_a
export MSQL_UNIX_PORT=/dev/msql_2; msql db_b
would do the job.
</pre>
<hr>
<h3><a name="unique-keys">How can I automatically ensure that each
record receives a unique primary key?</a></h3>
mSQL version 1.<i>x</i> does not have an automatic key assignment
functionality. A number of solutions to this problem are available. <p>
<ul>
<li> Use Pascal Forget's <a href="#sgs">unique sequence number
generator</a>. <p>
<li> Build the unique key assignment and management into your
application. <p>
One suggestion on how to implement this comes from Vivek Khera
<a href="mailto:khera@kci.kciLink.com">
<khera@kci.kciLink.com></a>. <p>
Vivek writes: <p>
<pre>
What I do is take some of the fields in the record, tack on a salt
like the current time and generate a hash (either SHA or MD5) of
it. I use part of the the hash string value as the key.
</pre>
Another solution is provided by Rasmus Lerdorf
<a href="mailto:rasmus@vex.net"><rasmus@vex.net></a>. <p>
Rasmus writes: <p>
<pre>
The issue here is not so much how to generate a key, but how to
ensure it is unique. The way I have done it in the past is to
associate a lock file with each table. Each table has a counter
record. With the table locked, I pull out the current counter
value, increment it, and put it back. Then I unlock the table. This
is not the most efficient way to do it, but it does work nicely for
systems that do not get pounded with queries.
</pre>
Others have suggested using a timestamp with milli second
granularity. This approach has its pitfalls. <p>
<ul>
<li> Not all client side operating systems have access to the
<tt>gettimeofday()</tt> calls (or its equivalent).
<li> Not all systems can determine the system time to the milli
second.
<li> Because the timestamps are being determined by the
clients, it is possible for two clients to arrive at the same
timestamp. This problem is amplified if you have a number of
clients running on different machines which are not
synchronised. This can be avoided by recalculating the
timestamp if an insert operation fails due to a duplicate key
error.
<li> Clocks may drift backwards causing old timestamps to be
reused. Sites that use time synchronisation methods such as
<tt>rdate</tt> or <tt>xntp</tt> may be prone to this.
</ul>
<p>
<li> Use a patch provided Jochem Wiedmann
<a href="mailto:wiedmann@wiedmann.neckar-alb.de">
<wiedmann@wiedmann.neckar-alb.de></a>. This patch allows you
to declare a key as: <p>
<pre>
AUTO PRIMARY KEY
</pre>
This patch is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLpatches/msql-auto-pkey.patch.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLpatches/msql-auto-pkey.patch.gz</a>
(6329 bytes)
</pre>
<li> Marcantonio Magnarapa
<a href="mailto:marcantonio@magnarapa.com">
<marcantonio@magnarapa.com></a> submits this suggestion for
those of you with web interfaces to your mSQL databases: <p>
Marcantonio writes:
<pre>
I have found a quick and dirty method that works for most
situations. In my case, I include in the web form where I insert
something into the database a HIDDEN field whose value is
determined by a webpage hit counter. Any text-based server-side
include hit counter is fine. For instance, in my page I have
something like:
<input type=hidden name=id value="<!--#exec cgi-bin/counter.pl>" >
the ID field is always different, although it may not be sequential.
this didn't require a single line of code because I already had a
hitcounter, and this is supposed to work for many situations.
</pre>
</ul>
mSQL version 2.<i>x</i> has an automatic sequence number associated
with each table. More on this in later FAQs. <p>
<hr>
<h2><a name="multiple-includes">How can I avoid compiler redefinition
errors when compiling my own mSQL applications?</a></h2>
When building your own mSQL applications you may encounter compiler
errors similar to: <p>
<pre>
/usr/local/Minerva/include/msql.h:30: redefinition of `m_row'
/usr/local/Minerva/include/msql.h:32: redefinition of `struct field_s'
</pre>
This occurs because the mSQL header file <tt>msql.h</tt> has been
included more than once. <p>
To avoid this, apply the following patch to <tt>msql.h</tt>
contributed by Vesa Tuomi <a href="mailto:vesa@cardinal.fi">
<vesa@cardinal.fi></a> <p>
<pre>
<font size="-1">
*** ./src/msql/msql.h.orig Wed Mar 6 09:27:20 1996
--- ./src/msql/msql.h Thu Mar 7 10:29:46 1996
***************
*** 16,21 ****
--- 16,23 ----
**
*/
+ #ifndef __MSQL_H__
+ #define __MSQL_H__
#if defined(__STDC__) || defined(__cplusplus)
# define __ANSI_PROTO(x) x
***************
*** 109,111 ****
--- 111,115 ----
#ifdef __cplusplus
}
#endif
+
+ #endif /* __MSQL_H__ */
</font>
</pre>
and rerun the <tt>make install</tt> phase of the mSQL installation
procedure. This will remake all the core mSQL applications and install
the modified <tt>msql.h</tt> file in your installation <tt>include</tt>
directory. It will also reinstall the core mSQL applications in your
installation <tt>bin</tt> directory. There is NO need to recompile any
other third party applications. <p>
<hr>
<h3><a name="linking">How do I link the mSQL library with my own
code?</a></h3>
Most compilers will search a well defined list of standard directories
for include and library files. These are typically
<tt>/usr/include</tt>, <tt>/usr/lib</tt>, <tt>/lib</tt> and
occasionally <tt>/usr/local/include</tt> and <tt>/usr/local/lib</tt>.
If you wish to use files that are outside these locations you must tell
your compiler which directories to search. <p>
Most C compilers understand the command line arguments: <p>
<pre>
-I<i>include_directory</i>
</pre>
and
<pre>
-L<i>library_directory</i>
</pre>
to mean "search the directory <i>include_directory</i> for
include files and search the directory <i>library_directory</i> for
libraries". <p>
If you wish to compile a program that will communicate with the mSQL
database server you must tell the compiler where the mSQL include and
library files were installed. Assuming you installed mSQL in
<tt>/usr/local/Minerva</tt> and you use <tt>gcc</tt>, the syntax would
resemble: <p>
<pre>
gcc -c -I/usr/local/Minerva/include <i>your_prog.c</i>
gcc -o <i>your_prog</i> <i>your_prog.o</i> -L/usr/local/Minerva -lmsql
</pre>
<b>Note:</b> Libraries <b>MUST</b> be specified last. Most compilers
will give strange errors if you specify the library paths and libraries
before any <tt>.c</tt> or <tt>.o</tt> files. <p>
<b>Note:</b> that the mSQL library name has been truncated. The actual
mSQL library file name is <tt>libmsql.a</tt>. However, the compiler
(and the link loader) only need the unique part of the file name so
the <tt>lib</tt> and <tt>.a</tt> components should be removed when
passing the library name on the command line. <p>
If you are using an SVR4 version of Unix (such as Solaris 2.<i>x</i>)
you may also have to include some networking libraries: <p>
<pre>
gcc -o <i>your_prog</i> <i>your_prog.o</i> -lsocket -lnsl -L/usr/local/Minerva -lmsql
</pre>
<hr>
<h3><a name="numrows">How can I find the number of rows in a
table?</a></h3>
If you're writing code in C, the following will work: <p>
<pre>
msqlQuery(dbsocket, "SELECT * from blah");
result = msqlStoreResult();
number = msqlNumRows(result);
msqlFreeResult(result);
</pre>
<hr>
<h3><a name="delete-all">How can I delete all the rows in a table
without destroying the table structure?</a></h3>
If you wish to clear the contents of a table without actually dropping
the table, use the following syntax: <p>
<pre>
DELETE FROM <i>table_name</i>\g
</pre>
<hr>
<h3><a name="ascii-import">How can I import flat files or other
database formats into an mSQL table?</a></h3>
For users of mSQL version 1.<i>x</i>, use Pascal Forget's
<a href="mailto:pascal@wsc.com"><pascal@wsc.com></a>
<tt>msql-import</tt> utility. Details on how to obtain this utility can
be found in the <a href="#other-apps"> "Contributed Code and Third
Party Applications"</a> section. Look for the subsection titled
<a href="#msql-import">"Flat File Importer"</a>. <p>
<tt>msql-import</tt> is bundled with mSQL version 2.<i>x</i>. <p>
<hr>
<h3><a name="touched">How can I determine the number of rows affected
by my last query?</a></h3>
David Hughes
<a href="mailto:bambi@hughes.com.au">
<bambi@hughes.com.au></a> writes: <p>
<pre>
In mSQL 2.0 the return value from msqlQuery() tells you the number
of rows "touched" by the query (i.e. deleted for a
DELETE, returned for a SELECT, modified for an UPDATE etc).
</pre>
<hr>
<h3><a name="w3auth">How can I get <tt>w3-msql</tt> to work with
<tt>w3-auth</tt>?</a></h3>
Jason Hudgins <a href="mailto:hudginsj@smtp.dancooks.com">
<hudginsj@smtp.dancooks.com></a> has written a paper on
"<i>The Unofficial Guide to W3-AUTH</i>". It is available
from: <p>
<pre>
<a href="http://www.dancooks.com/~jason/w3-msql/w3auth.html">http://www.dancooks.com/~jason/w3-msql/w3auth.html</a>
</pre>
<hr>
<hr width="75%">
<!-- End of Part 3 -->
<center>
<h2><a name="other-apps">Contributed Code and Third Party
Applications</a></h2>
</center>
<b>Note:</b> Many of the URLs in this section have changed to reflect
a directory reorganisation at
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib">
<tt>ftp://bond.edu.au/pub/Minerva/msql/Contrib</tt></a>. The packages
in question will not be flagged as changed unless the package itself
has been updated since the last release of the FAQ. <p>
A number of people have contributed additional software that works with
mSQL. The contributed software falls into two categories - that
developed by David Hughes (mSQL's author) and that developed by
others. <p>
<b>Note:</b> Please consult the documentation that comes with each of
these applications to determine the licensing obligations that may be
involved in their use. <p>
<b>Note:</b> Some of these applications are available via anonymous ftp
from the mSQL contributed code directory
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib">
<tt>ftp://bond.edu.au/pub/Minerva/msql/Contrib</tt></a>. There is often
a delay of a day or so for newly released files to be moved from the
<a href="ftp://bond.edu.au/pub/Minerva/msql/Incoming">
<tt>ftp://bond.edu.au/pub/Minerva/msql/Incoming</tt></a> directory to
the <a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib">
<tt>ftp://bond.edu.au/pub/Minerva/msql/Contrib</tt></a> directory. <p>
<center>
<table border=2 cellpadding=3 bgcolor="#cccccc">
<tr>
<td>
<a href="#esl">ESL</a>
</td>
<td>
<a href="#msqltools">mSQL Tools</a>
</td>
</tr>
<tr>
<td>
<a href="#w3-msql">w3-msql</a>
</td>
<td>
<a href="#msqlui">mSQL User Interface for Windows</a>
</td>
</tr>
<tr>
<td>
<a href="#lite">Lite</a>
</td>
<td>
(=) <a href="#msutil">msutil - an alternative C API for mSQL</a>
</td>
</tr>
<tr>
<td>
<a href="#addfsecure">Addf-Secure</a>
</td>
<td>
<a href="#ms-windows">MS Windows</a>
</td>
</tr>
<tr>
<td>
<a href="#apache">Apache</a>
</td>
<td>
<a href="#nextstep">NeXTSTEP EOF</a>
</td>
</tr>
<tr>
<td>
<a href="#applixware">Applixware</a>
</td>
<td>
<a href="#oo-html">Object Oriented HTML API</a>
</td>
</tr>
<tr>
<td>
<a href="#backups">Backup Script</a>
</td>
<td>
<a href="#ocx">OCX</a>
</td>
</tr>
<tr>
<td>
<a href="#dns-bind">Bind</a>
</td>
<td>
<a href="#odbc">ODBC</a>
</td>
</tr>
<tr>
<td>
<a href="#command-line">Command Line Tool</a>
</td>
<td>
<a href="#onyx">Onyx</a>
</td>
</tr>
<tr>
<td>
<a href="#dbadmin">Dbadmin</a>
</td>
<td>
(=) <a href="#oscafe">Open Systems Cafe</a>
</td>
</tr>
<tr>
<td>
<a href="#dbase">DBASE</a>
</td>
<td>
<a href="#os2">OS/2</a>
</td>
</tr>
<tr>
<td>
<a href="#dbi">DBI/DBD</a>
</td>
<td>
<a href="#perl">Perl</a>
</td>
</tr>
<tr>
<td>
<a href="#dbunk">DBunk</a>
</td>
<td>
<a href="#php">PHP - Home Page Construction Kit</a>
</td>
</tr>
<tr>
<td>
<a href="#dbview">Dbview</a>
</td>
<td>
<a href="#pts">PTS</a>
</td>
</tr>
<tr>
<td>
<a href="#digger">Digger</a>
</td>
<td>
<a href="#python">Python</a>
</td>
</tr>
<tr>
<td>
<a href="#emacs">Emacs</a>
</td>
<td>
<a href="#radius">RADIUS</a>
</td>
</tr>
<tr>
<td>
<a href="#msql-import">Flat File Importer</a>
</td>
<td>
<a href="#rexx">REXX</a>
</td>
</tr>
<tr>
<td>
<a href="#html-example">HTML Interface to mSQL</a>
</td>
<td>
<a href="#simple-sql">Simple SQL</a>
</td>
</tr>
<tr>
<td>
<a href="#ici">ICI</a>
</td>
<td>
<a href="#sqlbase">SQLBase</a>
</td>
</tr>
<tr>
<td>
<a href="#jate">Jate</a>
</td>
<td>
<a href="#tcl">Tcl</a>
</td>
</tr>
<tr>
<td>
<a href="#java">Java</a>
</td>
<td>
<a href="#time-utils">Time and date utilities</a>
</td>
</tr>
<tr>
<td>
<a href="#jio">Jio</a>
</td>
<td>
<a href="#tkmsql">tkmSQL</a>
</td>
</tr>
<tr>
<td>
<a href="#siod">LISP/Scheme</a>
</td>
<td>
<a href="#sgs">Unique sequence number generator</a>
</td>
</tr>
<tr>
<td>
<a href="#literepository">Lite Repository</a>
</td>
<td>
<a href="#vdb">Virtual Database</a>
</td>
</tr>
<tr>
<td>
<a href="#metahtml">Meta-HTML</a>
</td>
<td>
<a href="#virtuflex">VirtuFlex</a>
</td>
</tr>
<tr>
<td>
<a href="#ms-access7">MS Access to mSQL</a>
</td>
<td>
<a href="#visual-basic">Visual Basic</a>
</td>
</tr>
<tr>
<td>
<a href="#ms-access-dbase3">MS Access and dBase III</a>
</td>
<td>
<a href="#wdb">WDB</a>
</td>
</tr>
<tr>
<td>
<a href="#msqlcgi">mSQL CGI</a>
</td>
<td>
<a href="#websql">Websql</a>
</td>
</tr>
<tr>
<td>
<a href="#msqlexpire">mSQLexpire</a>
</td>
<td>
<a href="#tryc-repository">Wojciech Tryc's Repository</a>
</td>
</tr>
<tr>
<td>
<a href="#msqlexport">mSQL Export</a>
</td>
<td>
<a href="#xfsql">XfSQL</a>
</td>
</tr>
<tr>
<td>
<a href="#msqlkeeper">mSQL Keeper</a>
</td>
<td>
<a href="#xsqlmenu">Xsqlmenu</a>
</td>
</tr>
<tr>
<td>
<a href="#msqlsummary">mSQL Summary</a>
</td>
<td>
<a href="#cplusplus">Z Classes for C++</a>
</td>
</tr>
</table>
</center>
<p>
<dl>
<dt><b><a name="esl">ESL</a></b>
<dd> David developed mSQL as the database component of a larger
network management project called Minerva (Minerva was the Roman
goddess of knowledge and information). Another component of Minerva
is an <b>E</b>xtensible <b>S</b>cripting <b>L</b>anguage called
ESL. This has a C like syntax and provides support for the complete
mSQL API as well as full SNMP support. It is available via
anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/esl/esl-0.3.tar.gz">ftp://bond.edu.au/pub/Minerva/esl/esl-0.3.tar.gz</a>
(407046 bytes)
</pre>
<dt><b><a name="w3-msql">W3-mSQL</a></b>
<dd> David has also developed W3-mSQL which is an interface between
the World-Wide Web and mSQL. It is a mechanism that can be used to
greatly simplify the use of an SQL database behind a web server.
Using W3-mSQL, you can embed SQL queries within your pages and have
the results generated on the fly. It is available via anonymous ftp
from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/w3-msql/w3-msql-1.0.3.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/w3-msql/w3-msql-1.0.3.tar.gz</a>
(54811 bytes)
</pre>
W3-mSQL version 2.0 is bundled with mSQL 2.<i>x</i>. It uses the
bundled <a href="#lite">Lite</a> language embedded within HTML
tags. <p>
W3-mSQL version 2.0 is incompatible with version 1.<i>x</i>. <p>
More details on version 2.0 of W3-mSQL can be found in the
documentation distributed with mSQL 2.<i>x</i>. <p>
<dt><b><a name="lite">Lite</a></b>
<dd> Bundled with mSQL version 2.<i>x</i> is Lite. Lite has a C
like syntax and is designed as a stand alone scripting language for
use with mSQL. <p>
More details on Lite can be found in the documentation distributed
with mSQL 2.<i>x</i>. <p>
<dt><b><a name="addfsecure">Addf-Secure</a></b>
<dd> Max Levchin <a href="mailto:mlevchin@ampere.scale.uiuc.edu">
<mlevchin@ampere.scale.uiuc.edu></a> has written a utility
that will allow you to securely add a new column to an mSQL table.
More details can be found at: <p>
<pre>
<a href="http://ampere.scale.uiuc.edu/~mlevchin/addf">http://ampere.scale.uiuc.edu/~mlevchin/addf</a>
</pre>
<dt><b><a name="apache">Apache</a></b>
<dd> Dirk van Gulik
<a href="mailto:Dirk.vanGulik@jrc.it">
<Dirk.vanGulik@jrc.it></a> has developed some code for use
with HTML and HTTP servers with specific reference to the Apache
HTTP server. It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.ceo.org/pub/ewse-mSQL-apache-demos/apache-msql-demo.1.0.1.tar.gz">ftp://ftp.ceo.org/pub/ewse-mSQL-apache-demos/apache-msql-demo.1.0.1.tar.gz</a>
(12723 bytes)
</pre>
If you require a module that allows the Apache httpd daemon to
perform authentication via an mSQL database, grab the file: <p>
<pre>
<a href="http://www.apache.org/dist/contrib/modules/mod_auth_msql.c">http://www.apache.org/dist/contrib/modules/mod_auth_msql.c</a>
(9269 bytes)
</pre>
<dt><b><a name="applixware">Applixware</a></b>
<dd> Cameron Newham <a href="mailto:cam@sspl.demon.co.uk">
<cam@sspl.demon.co.uk></a> has written a shared library
and query utility for Applixware, interfacing to MSQL 2.0. You can
find more details at: <p>
<pre>
<a href="http://www.iinet.com.au/~cam/applix.html">http://www.iinet.com.au/~cam/applix.html</a>
</pre>
<dt><b><a name="backups">Backup Script</a></b>
<dd> C Latham <a href="mailto:clatham@nerosworld.com">
<clatham@nerosworld.com></a> has written a shell script that
will backup mSQL databases. It is reprinted here in full: <p>
<pre>
<font size="-1">
#!/bin/sh
# $Id: msqlbckp v. 1.0 1996/6/22 $
# by: clatham@nerosworld.com
#
# usage: msqlbckp [-h host] 'backup directory'
#
# This script creates daily backups of mSQL databases. Input parameters are
# host machine (if msqld is not running on local machine) and the pathname
# of a directory where the backups will be made. The backups will be named:
# {table name}.{day of week}.gz (They are gzipped).
#
# The structure of the backup files are in a format that can be read
# by the 'msql' program to completely restore the database, by first
# dropping the corrupt table, then recreating the table and populating it
# with data (it is required that the database itself already exists, which
# may require the database administrator to use msqladmin to create the
# database in extreme circumstances).
#
# Access is required to msqldump, relshow and gzip.
#
# Set crontab to execute this script at, say, 4 am every day, every other
# day, or however often you want backups of your databases.
#
err( ) {
echo usage: msqlbckp [-h host] 'backup directory'
exit 1
}
case $# in
1)
bdir=$1
;;
3)
if [ $1 = "-h" ]
then
host="-h "$2
else
err
fi
bdir=$3
;;
*)
err
;;
esac
dow=`date '+%A'` # Get the day of the week
# Use relshow to get a list of the available databases, and pare that down
# into a file listing one database name per line...
relshow ${host} | \
sed -n -e '/^....[ \-].*/d' -e 's/ \| //' -e 's/ *\|//p' \
>${bdir}/db.names
# Get each database name from the file for table processing
dbline=1
while [ 1 ] # Do forever until no more db names
do
dodb=`cat ${bdir}/db.names | sed -n "${dbline}p"`
if [ "${dodb}" = "" ] # if no more db names to do
then
break
fi
cf=${bdir}/${dodb}.${dow} # Define current working file
echo "#
# mSQL Dump of Database: ${dodb}
#
# Begin by dropping all tables
#---------------------------------------------
" > ${cf}
# Now add commands to 'drop' each table in the database
relshow ${host} ${dodb} | \
sed -n -e '/^....[ \-].*/d' -e 's/ \| //' -e 's/ *\|//p' | \
awk '($0 !~ /^$/) { print "DROP TABLE", $1, "\\g" }' >> ${cf}
echo " " >> ${cf}
# Dump the database structure and data into the backup file
msqldump ${host} ${dodb} >> ${cf}
# Finally, gzip the file
gzip -f ${cf}
# Next database name
dbline=`expr ${dbline} + 1`
done
rm ${bdir}/db.names # Get rid of temp file
</font>
</pre>
<dt><b><a name="dns-bind">Bind</a></b>
<dd> Chris Seawood
<a href="mailto:mgrcls@nextwork.rose-hulman.edu">
<mgrcls@nextwork.rose-hulman.edu></a> has extended the DNS
naming service - BIND - to support mSQL databases. It is available
in the <tt>contrib/msql</tt> directory of the current release of
BIND which can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.vix.com/pub/bind/release/bind-4.9.3-REL.tar.gz">ftp://ftp.vix.com/pub/bind/release/bind-4.9.3-REL.tar.gz</a>
(1682741 bytes)
</pre>
Chris has also released a beta version of <tt>msql_bind</tt> that
works with mSQL version 2.<i>x</i>. For more details see: <p>
<pre>
<a href="http://www.seawood.org/msql_bind">http://www.seawood.org/msql_bind</a>
</pre>
<dt><b><a name="command-line">Command Line Tool</a></b>
<dd> Kai Mysliwiec
<a href="mailto:kvm@camelot.de"><kvm@camelot.de></a>
has developed an mSQL tool that allows you to send SQL queries from
the command line. It is available from: <p>
<pre>
<a href="http://www.camelot.de/~kvm/progs/sql.tar.gz">http://www.camelot.de/~kvm/progs/sql.tar.gz</a>
(14083 bytes)
</pre>
<dt><b><a name="dbadmin">Dbadmin</a></b>
<dd> James Harrell
<a href="mailto:gt4960a@prism.gatech.edu">
<gt4960a@prism.gatech.edu></a> has developed a CGI
application that allows database administration using a web based
form interface. A demonstration can be seen at: <p>
<pre>
<a href="http://bauhaus.skiles.gatech.edu/~jharrell">http://bauhaus.skiles.gatech.edu/~jharrell</a>
</pre>
Source code is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/dbadmin/dbadmin_v1.0.1.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/dbadmin/dbadmin_v1.0.1.tar.gz</a>
</pre>
<dt><b><a name="dbase">DBASE</a></b>
<dd> Maarten Boekhold
<a href="mailto:M.Boekhold@et.tudelft.nl">
<M.Boekhold@et.tudelft.nl></a> has written a dbase to mSQL
conversion utility. It handles the dbf data types <tt>string</tt>,
<tt>num</tt>, <tt>real</tt> and <tt>date</tt>. It does not yet
handle <tt>memo-fields</tt> because mSQL 1.<i>x</i> lacks support
for variable length <tt>char</tt> fields. Maarten is aware that
this may be insufficient for some users' needs but he is releasing
the utility as 'do-whatever-you-want' software. It is available via
anonymous ftp from:
<pre>
<a href="ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/dbf2sql-2.2.tar.gz">ftp://ftp.nerosworld.com/pub/SQL/dbf2sql/dbf2sql-2.2.tar.gz</a>
(18207 bytes)
</pre>
<dt><b><a name="dbi">DBI/DBD</a></b>
<dd> Tim Bunce
<a href="mailto:Tim.Bunce@ig.co.uk"><Tim.Bunce@ig.co.uk></a>
is working on a generic database driver (DBI) which allows perl to
interface to any database in a standardised way. Details of Tim's
work are available from: <p>
<pre>
<a href="http://www.hermetica.com">http://www.hermetica.com</a>
</pre>
<a name="dbd-msql"><dd> Alligator Decartes</a>
<a href="mailto:descarte@hermetica.com">
<descarte@hermetica.com></a> has added an mSQL driver to
Tim's work and his contributions can be obtained via anonymous ftp
from: <p>
<pre>
<a href="ftp://ftp.mcqueen.com/pub/dbperl">ftp://ftp.mcqueen.com/pub/dbperl</a>
</pre>
It is also available from any CPAN (Comprehensive Perl Archive
Network) site in the "modules" directory. For more
information about CPAN see: <p>
<pre>
<a href="ftp://ftp.funet.fi/pub/languages/perl/CPAN">ftp://ftp.funet.fi/pub/languages/perl/CPAN</a>
</pre>
The latest blurb describing Alligator's work can be obtained from: <p>
<pre>
<a href="http://www.hermetica.com/technologia/DBI">http://www.hermetica.com/technologia/DBI</a>
</pre>
<dt><b><a name="dbunk">DBunk</a></b>
<dd> Dave Shevett <a href="mailto:shevett@homeport.org">
<shevett@homeport.org></a> has written DBunk - a Java based
graphical front end to mSQL. Source code is available from: <p>
<pre>
<a href="http://www.homeport.org/~shevett/dbunk.tar.gz">http://www.homeport.org/~shevett/dbunk.tar.gz</a>
</pre>
<dt><b><a name="dbview">Dbview</a></b>
<dd> Gian Paolo Ciceri
<a href="mailto:gp.ciceri@it.net"><gp.ciceri@it.net></a>
has written a utility similar to
<a href="#support-progs">relshow</a>. <p>
It shows the structure of an mSQL database as well as indicating
the number of records in the tables. <p>
It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/dbview/dbview.c.lsm">ftp://bond.edu.au/pub/Minerva/msql/Contrib/dbview/dbview.c.lsm</a>
(563 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/dbview/dbview.c">ftp://bond.edu.au/pub/Minerva/msql/Contrib/dbview/dbview.c</a>
(16933 bytes)
</pre>
<dt><b><a name="digger">Digger</a></b>
<dd> The folks at
<a href="http://www.bunyip.com">Bunyip Information Services</a>
(the current maintainers of the <a href="#mailing-list">mSQL
mailing list</a>) have used mSQL as the database component of their
Digger system. <p>
Digger is a Distributed Directory Service for the Internet based on
Whois++ technology. For more information about digger send mail to
<a href="mailto:digger-info@bunyip.com">
<digger-info@bunyip.com></a> or have a look at Bunyip's web
pages:
<pre>
<a href="http://www.bunyip.com/products/digger">http://www.bunyip.com/products/digger</a>
</pre>
<dt><b><a name="emacs">Emacs</a></b>
<dd> Igor Romanenko
<a href="mailto:igor@frog.kiev.ua"><igor@frog.kiev.ua></a>
has contributed some lisp code to provide emacs with hooks into
mSQL. It allows the msql monitor to run in an emacs window, so you
can use emacs for editing and command recall. It is available via
anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLEmacs/sql-mode.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLEmacs/sql-mode.tar.gz</a>
(6883 bytes)
</pre>
<dt><b><a name="msql-import">Flat File Importer</a></b>
<dd> Pascal Forget
<a href="mailto:pascal@wsc.com"><pascal@wsc.com></a> has
contributed a program that will import flat file databases directly
into mSQL databases. It supports both the version 1.<i>x</i> and
2.<i>x</i> releases of mSQL. It is available via anonymous ftp
from: <p>
<pre>
<a href="ftp://ftp.wsc.com/pub/freeware/msql/msql-import-0.1.4.tar.gz">ftp://ftp.wsc.com/pub/freeware/msql/msql-import-0.1.4.tar.gz</a>
(14281 bytes)
</pre>
Notwithstanding any bug fixes, this will be the last
"stand alone" release of <tt>msql-import</tt> that can be
used with mSQL version 1.<i>x</i>. Future versions will be bundled
with mSQL version 2.<i>x</i>. <p>
<dt><b><a name="html-example">HTML Interface to mSQL</a></b>
<dd> Sol Katz
<a href="mailto:skatz@blm.gov"><skatz@blm.gov></a> has
written some C code that demonstrates an HTML interface to mSQL.
Unlike other applications, this program does
not need to be modified when new mSQL tables or
databases are created. All required information is
contained in the html. <p>
It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLCGI/msqlc2.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLCGI/msqlc2.zip</a>
(29002 bytes)
</pre>
and also from: <p>
<pre>
<a href="ftp://ftp.blm.gov/pub/gis/msqlc2.zip">ftp://ftp.blm.gov/pub/gis/msqlc2.zip</a>
(29002 bytes)
</pre>
It can be seen in operation at: <p>
<pre>
<a href="http://www.blm.gov/gis/msql/vertical/test2.html">http://www.blm.gov/gis/msql/vertical/test2.html</a>
</pre>
<dt><b><a name="ici">ICI</a></b>
<dd> Yiorgos Adamopoulos
<a href="mailto:Y.Adamopoulos@noc.ntua.gr">
<Y.Adamopoulos@noc.ntua.gr></a> has written an mSQL extension
for the ICI programming language. It is available via anonymous ftp
from: <p>
<pre>
<a href="ftp://ftp.ntua.gr/pub/lang/ici/iciMsql.tar.gz">ftp://ftp.ntua.gr/pub/lang/ici/iciMsql.tar.gz</a>
(249077 bytes)
</pre>
Yiorgos has set up a mailing list for <tt>iciMsql</tt>. Questions
can be sent to: <p>
<pre>
<a href="mailto:iciMsql@noc.ntua.gr">iciMsql@noc.ntua.gr</a>
</pre>
<dt><b><a name="jate">Jate</a></b>
<dd> Josef <a href="mailto:ht@aiace.lnf.infn.it">
<ht@aiace.lnf.infn.it></a> has developed Jate - a CGI
program that builds HTML interfaces to mSQL databases. More
details can be found at: <p>
<pre>
<a href="http://aiace.lnf.infn.it/~ht/JATE.html">http://aiace.lnf.infn.it/~ht/JATE.html</a>
</pre>
<dt>(-) <b><a name="java">Java</a></b>
<dd> Darryl Collins
<a href="mailto:darryl@minmet.uq.oz.au">
<darryl@minmet.uq.oz.au></a> has developed a version of the
mSQL API for the Java programming language. <p>
MsqlJava for mSQL version 1.<i>x</i> is available via anonymous
ftp from: <p>
<pre>
<a href="ftp://dada.minmet.uq.edu.au/pub">ftp://dada.minmet.uq.edu.au/pub</a>
</pre>
MsqlJava for mSQL version 2.<i>x</i> is available via anonymous
ftp from: <p>
<pre>
<a href="ftp://dada.minmet.uq.edu.au/pub/MsqlJava-1.2.0.tar.gz">ftp://dada.minmet.uq.edu.au/pub/MsqlJava-1.2.0.tar.gz</a>
(23483 bytes)
</pre>
For more details see: <p>
<pre>
<a href="http://www.minmet.uq.oz.au/msqljava">http://www.minmet.uq.oz.au/msqljava</a>
</pre>
<dd> George Reese <a href="mailto:borg@imaginary.com">
<borg@imaginary.com></a> has developed a Java Database
Connection (JDBC) class library using MsqlJava. It is available via
anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.imaginary.com/pub/Java/database/mSQL-JDBC.tar.gz">ftp://ftp.imaginary.com/pub/Java/database/mSQL-JDBC.tar.gz</a>
(33063 bytes)
</pre>
For more details see: <p>
<pre>
<a href="http://www.imaginary.com/Java">http://www.imaginary.com/Java</a>
</pre>
<dd> Douglas Beeson <a href="mailto:beesond@ecworld.org">
<beesond@ecworld.org></a> reports:
<pre>
Sun has just released its Java Servlets API that includes, among other
things, a Java runtime that works from within Netscape servers, similar
to a plug-in. The same servlet runner is available for ISAPI and the
Apache server. With a servlet written in Java and using the Java-mSQL
package cited in the FAQ, you can open a connection to an mSQL database
on the local or remote server, query the DB and return the result as
HTML using an http response object pre-defined in the servlet API.
Best of all, the servlets API is free.
<a href="http://jserv.javasoft.com/products/java-server/sdk/index.shtml">http://jserv.javasoft.com/products/java-server/sdk/index.shtml</a>
</pre>
<dt><b><a name="jio">Jio</a></b>
<dd> Simon Kenyon <a href="mailto:S.Kenyon@koala.ie">
<S.Kenyon@koala.ie></a> has developed Jio which is a dynamic
web content generation system written as a Java servlet. It uses
JDBC to connect to mSQL which contains the data. All generated
pages are created using templates. Source code is included and it
is free for commercial use. See the COPYRIGHT file included with
the Jio distribution for details. <p>
It is available via anonymous ftp from: <p>
<pre>
<a href="http://www.koala.ie/jio/dist/jio-1.3.tar.gz">http://www.koala.ie/jio/dist/jio-1.3.tar.gz</a>
(35104 bytes)
</pre>
<dt><b><a name="siod">LISP/Scheme</a></b>
<dd> George J. Carrette <a href="mailto:gjc@world.std.com">
<gjc@world.std.com></a> has developed SIOD which is
"a small-footprint implementation of the Scheme programming
language that is provided with some database, unix
programming and cgi scripting extensions". SIOD provides
interfaces to Oracle, Sybase, mSQL and Digital RDB databases. <p>
Details of the current release of SIOD can be found at: <p>
<pre>
<a href="http://people.delphi.com/gjc/siod.html">http://people.delphi.com/gjc/siod.html</a>
</pre>
The latest copy of SIOD can usually be found at: <p>
<pre>
<a href="ftp://ftp.std.com/pub/gjc/siod.tgz">ftp://ftp.std.com/pub/gjc/siod.tgz</a>
(156846 bytes)
</pre>
or
<pre>
<a href="http://people.delphi.com/gjc/siod.tgz">http://people.delphi.com/gjc/siod.tgz</a>
(156730 bytes)
</pre>
George has used SIOD as part of a system to: <p>
<pre>
abstract html tricks from programming tricks by considering html
files, or portions of html files, to be templates or chunks of html
upon which simple substitutions are made
</pre>
More details of "Chunk HTML" can be found at: <p>
<pre>
<a href="http://people.delphi.com/gjc/chtml.html">http://people.delphi.com/gjc/chtml.html</a>
</pre>
<dt><b><a name="literepository">Lite Repository</a></b>
<dd> Jeanne Gold <a href="mailto:goldj@Ix.netcom.com">
<goldj@Ix.netcom.com></a> has established a site for Lite
contributions. For more details see: <p>
<pre>
<a href="http://www.gold-cousins.org/lite_site">http://www.gold-cousins.org/lite_site</a>
</pre>
<dt><b><a name="metahtml">Meta-HTML</a></b>
<dd> Universal Access Inc has released a version of their Meta-HTML
scripting language which has extensions for connecting to mSQL
databases. <p>
Henry Minsky <a href="mailto:hqm@ua.com">
<hqm@ua.com></a> writes: <p>
<pre>
<Meta-HTML> is a programming language specifically designed
for working within the World Wide Web environment. Although it is a
genuine programming language, suitable for large-scale symbolic
manipulation, it provides the most commonly wanted Web
functionality as built-in primitives, so you don't have to write
them.
</pre>
More details (including source code) can be found at: <p>
<pre>
<a href="http://www.metahtml.com">http://www.metahtml.com</a>
</pre>
There is also an anonymous ftp site for those of you without web
access: <p>
<pre>
<a href="ftp://ftp.metahtml.com/pub">ftp://ftp.metahtml.com/pub</a>
</pre>
<dt><b><a name="ms-access7">MS Access to mSQL</a></b>
<dd> Brian Andrews <a href="mailto:brian@informate.co.nz">
<brian@informate.co.nz></a> has written a function for use
with MS Access version 7. This function will take an Access 7
database and generate the appropriate mSQL <tt>INSERT</tt>
statements for importing the Access 7 data into an mSQL database.
<p>
Brian's original function is available from the mSQL mailing list
<a href="#list-archives">archives</a> for the month of January
1997. <p>
Jon Hilton <a href="mailto:jon@hisa.org.au">
<jon@hisa.org.au></a> has taken Brian's work and corrected a
few bugs and included support for mSQL version 2.<i>x</i>. <p>
Jon's function is available from the mSQL mailing list
<a href="#list-archives">archives</a> for the month of February
1997. It is also included here in full: <p>
<pre>
<font size="-1">
Function export_mSQL()
' Exports the database contents into a file in mSQL format
' IS NOT SELECTIVE! (exports ALL tables)
Dim dbase As DATABASE, tdef As Recordset, i As Integer, fd As Integer
Set dbase = CurrentDb()
' Open the export file
Open "E:\cota\infocom1.txt" For Output As #1
Print #1, "# Converted from MS Access to mSQL "
Print #1, "# by Brian Andrews, (c) InforMate Technologies, 1997"
Print #1, ""
' Go through the table definitions
For i = 0 To dbase.TableDefs.Count - 1
Print #1, "# TableDefs.Count - 1 =" & dbase.TableDefs.Count - 1
Print #1, "# This is table " & i
' Let's take only the visible tables
If ((dbase.TableDefs(i).Attributes And DB_SYSTEMOBJECT) Or
(dbase.TableDefs(i).Attributes And DB_HIDDENOBJECT)) Then
Else
' We DROP the table in case it already exists
' and then create it again
tname = "" & dbase.TableDefs(i).Name
Print #1, "# Access table " & tname
'remove spaces from tablename
For j = 1 To Len(tname)
If j < Len(tname) Then
If Mid$(tname, j, 1) = " " Then
s = Left$(tname, j - 1)
's = s & "" & Right$(t.Fields(j), Len(t.Fields(j)) - i + 1)
s = s & "" & Right$(tname, Len(tname) - j)
j = j + 1
found = True
tname = s
'Exit For
End If
End If
Next j
'restrict tablename to 19 chars
tname = Left$(tname, 19)
Print #1, ""
Print #1, ""
Print #1, "DROP TABLE " & tname & " \p\g"
Print #1,
Print #1, "CREATE TABLE " & tname & "("
' Step through all the fields in the table
For fd = 0 To dbase.TableDefs(i).Fields.Count - 1
'All fields are char at the moment - can be changed
Dim tyyppi As String, pituus As Integer, comma As String
Select Case dbase.TableDefs(i).Fields(fd).Type
Case DB_BOOLEAN
tyyppi = "char (8)"
Case DB_INTEGER, DB_BYTE, DB_LONG
tyyppi = "int"
Case DB_DOUBLE, DB_SINGLE, DB_CURRENCY
tyyppi = "real"
Case DB_TEXT
pituus = dbase.TableDefs(i).Fields(fd).Size
tyyppi = "char (" & pituus & ")"
' Need to leave enough room in date fields for date & time
Case DB_DATE
tyyppi = "char (17)"
' For some reason, DB_GUID doesn't seem to be noticed - 15 is the value
Case DB_MEMO, DB_GUID, DB_LONGBINARY, 15
'Special case fields - specific to one of my projects
If dbase.TableDefs(i).Fields(fd).Name = "Fund Summary " Then
tyyppi = "char (1500)"
ElseIf dbase.TableDefs(i).Fields(fd).Name = "Fund Analysis " Then
tyyppi = "char (3000)"
Else
tyyppi = "text (100)"
End If
End Select
' Don't print the separating comma after the last field
If fd < dbase.TableDefs(i).Fields.Count - 1 Then
comma = ","
Else
comma = ""
End If
' Print the field definition
'remove spaces from fieldname
stuff = "" & dbase.TableDefs(i).Fields(fd).Name
For j = 1 To Len(stuff)
If j < Len(stuff) Then
If Mid$(stuff, j, 1) = " " Then
s = Left$(stuff, j - 1)
's = s & "" & Right$(t.Fields(j), Len(t.Fields(j)) - i + 1)
s = s & "" & Right$(stuff, Len(stuff) - j)
j = j + 1
found = True
stuff = s
'Exit For
End If
End If
Next j
stuff = Left$(stuff, 19)
'mSQL 1 primary key declaration - always on first field
'mSQL 2 - now we need to use CREATE INDEX. Don't bother for now.
'If fd = 0 Then
'Print #1, " " & stuff & " " & tyyppi & " primary key" & comma
'Else
Print #1, " " & stuff & " " & tyyppi & comma
'End If
Next fd
Print #1, ")\p\g"
Print #1, ""
Dim recset As Recordset
Set recset = dbase.OpenRecordset(dbase.TableDefs(i).Name)
' Step through the rows in the table
reccount = recset.RecordCount
If reccount <> 0 Then
recset.MoveFirst
Do Until recset.EOF
Dim row As String, it As String
row = "INSERT INTO " & tname & " VALUES ("
' Go through the fields in the row
For fd = 0 To recset.Fields.Count - 1
Dim is_string As String
is_string = ""
stuff = "" & recset.Fields(fd).Value
Select Case recset.Fields(fd).Type
' For some reason, DB_GUID doesn't seem to be noticed - 15 is the value
Case DB_TEXT, DB_MEMO, DB_GUID, DB_DATE, DB_LONGBINARY, DB_BOOLEAN, 15
is_string = "'"
Case Else
If stuff = "" Then
stuff = "0"
End If
End Select
'**** escape single quotes
x = InStr(stuff, "'")
While x <> 0
s = Left$(stuff, x - 1)
s = s & "\" & Right$(stuff, Len(stuff) - x + 1)
stuff = s
x = InStr(x + 2, stuff, "'")
Wend
row = row & is_string & stuff & is_string
If fd < recset.Fields.Count - 1 Then
row = row & ","
End If
Next fd
' Add trailers and print
row = row & ")\p\g"
Print #1, row
' Move to the next row
recset.MoveNext
Loop
recset.Close
Set recset = Nothing
End If
End If
Next i
Close #1
dbase.Close
Set dbase = Nothing
End Function
</font>
</pre>
<dt><b><a name="ms-access-dbase3">MS Access & dBase III</a></b>
<dd> Brian Bartholemew
<a href="mailto:bb@wizard.pn.com"><bb@wizard.pn.com></a>
has written some scripts that translate dBase III tables saved from
MS Access into tab-separated formats. <p>
Brian writes: <p>
<pre>
Here are three scripts, the first two are clean ones that break out
tables saved from access in dBaseIII format into a tab-separated
format that a set of database-operator scripts called rdb can use.
The first breaks out .dbf files and the second breaks out .dbt
files which contain the text of variable-length-text memo fields;
the .dbf and .dbt can be joined by the block offset number given in
the text field. These scripts have only been tested on the field
types my database happens to have. Since the first one breaks out
the table definitions it's the obvious candidate to generate table
definitions for msql. The third script is a hack to get data into
msql so I can play with msql, but it's a starting point. The first
two scripts were written to be free of data-dependent bugs, the
third is somehow confused about null fields in Pascal's msql-import
program which I've hacked around to enter the complaining fields as
the text "NULL"; debugging is welcomed. The third script
needs rdb, available from <a href="ftp://rand.org/pub/RDB-hobbs">rand.org:/pub/RDB-hobbs</a>. I do MS Access
-> rdb -> msql because I use rdb as a prototyping tool, the
format is trivial to generate and modify, I have a forms-based
emacs front-end to rdb, and the tables compress nicely in rcs.
However, someone may wish to modify these scripts, (a) so that they
generate msql dump files instead of rdb files, thereby bypassing
the msql-import bug and the rdb dependency and probably some data
dependencies with maximum portability, or (b) so that they talk to
the database directly. If so please post diffs. Trigger the new
behaviour by a command-line option so the non-msql-perl behaviour
continues to run under vanilla perl. These programs are gpl'ed.
</pre>
They are available from the mSQL mailing list
<a href="#list-archives">archives</a> for the month of February
1996. <p>
<dt><b><a name="msqlcgi">mSQL CGI</a></b>
<dd> Alex Tang <a href="mailto:altitude@petrified.cic.net">
<altitude@petrified.cic.net></a> has written an mSQL front
end as a CGI program. For more details see: <p>
<pre>
<a href="http://petrified.cic.net/MsqlCGI">http://petrified.cic.net/MsqlCGI</a>
</pre>
<dt><b><a name="msqlexpire">mSQLexpire</a></b>
<dd> Scott Burkett <a href="mailto:scottb@dcicorp.com">
<scottb@dcicorp.com></a> has developed an mSQL utility that
provides a mechanism for automatic expiration of records based on
age. Further details can be seen at: <p>
<pre>
<a href="http://www.dcicorp.com/~scottb/projects/msqlexpire">http://www.dcicorp.com/~scottb/projects/msqlexpire</a>
</pre>
<dt><b><a name="msqlexport">mSQL-Export</a></b>
<dd> Kerry Garrison <a href="mailto:garrison@delta.net">
<garrison@delta.net></a> has developed a Perl script that
will export an mSQL table to a delimited text file. Further
details can be seen at: <p>
<pre>
<a href="http://design.delta.net/msqltools">http://design.delta.net/msqltools</a>
</pre>
<dt><b><a name="msqlkeeper">mSQL Keeper</a></b>
<dd> Chris Lambrou <a href="mailto:chrislambrou@ineternetmci.com">
<chrislambrou@ineternetmci.com></a> has written an mSQL
maintenance utility called mSQL Keeper. <p>
"mSQL Keeper is a collection of perl scripts that enables easy
management of an mSQL database. It requires no knowledge of SQL.
All database maintenance functions are executed through a GUI front
end, and SQL statements are built and submitted to the mSQL engine
from mSQL Keeper." <p>
mSQL Keeper currently supports mSQL 1.<i>x</i> databases. Chris has
plans for an mSQL 2.<i>x</i> version once mSQL 2.<i>x</i>
stabilises. <p>
More details can be found at: <p>
<pre>
<a href="http://www.cglis.com/msql_keeper">http://www.cglis.com/msql_keeper</a>
</pre>
<dt><b><a name="msqlsummary">mSQL Summary</a></b>
<dd> David Perry <a href="mailto:deperry@nerosworld.com">
<deperry@nerosworld.com></a> had someone write a program for
him that takes an SQL select statement (such as select distinct
fieldname, fieldname2, fieldnameN from tablename order by
fieldname) and propagates a second table with the results. It is
available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.nerosworld.com/pub/msql/Contrib/mSQLsummary/mSQL_summary.tar">ftp://ftp.nerosworld.com/pub/msql/Contrib/mSQLsummary/mSQL_summary.tar</a>
</pre>
<dt><b><a name="msqltools">mSQL Tools</a></b>
<dd> Kerry Garrison <a href="mailto:garrison@delta.net">
<garrison@delta.net></a> has setup a site that catalogues a
number of mSQL tools. It can be found at: <p>
<pre>
<a href="http://design.delta.net/msqltools">http://design.delta.net/msqltools</a>
</pre>
<dt><b><a name="msqlui">mSQL User Interface for Windows</a></b>
<dd> Chris Mai <a href="mailto:chrissde@aol.com">
<chrissde@aol.com></a> has developed a user interface for
Microsoft Windows that will connect to mSQL databases. It is
available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLui/msql-ui.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLui/msql-ui.zip</a>
</pre>
<dt>(=) <b><a name="msutil">msutil - an alternative C API for mSQL</a></b>
<dd> Rich Bryant
<a href="mailto:rbb@iseek.com">
<rbb@iseek.com></a> has developed an alternate C API for use
with mSQL. Details on msutil can be found at: <p>
<pre>
<a href="http://iseek.com/biztek/docs/msutil">http://iseek.com/biztek/docs/msutil</a>
</pre>
<dt><b><a name="ms-windows">MS Windows</a></b>
<dd> Dean Fuqua
<a href="mailto:fuqua@niehs.nih.gov">
<fuqua@niehs.nih.gov></a> has contributed an mSQL API for MS
Windows platforms. To use this software you need some Winsock
compliant stack. (i.e. Trumpet Winsock, MS TCP/IP-32, Chameleon,
etc.) It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLwinapi/winapi.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLwinapi/winapi.zip</a>
(87211 bytes)
</pre>
Not included in <tt>winapi.zip</tt> is an <tt>msql.ini</tt> file.
Its contents should resemble <p>
<pre>
[Server]
IP=your.server.host.name
Port=1112
Username=YourUsername
</pre>
There also appears to be a later version of Dean's work which
includes compiled executables in <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/Win-mSQL/winmsql7.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/Win-mSQL/winmsql7.zip</a>
(306827 bytes)
</pre>
Peter Tillemans <a href="mailto:pti@net4all.be">
<pti@net4all.be></a> has taken Dirk Ohme's
<a href="mailto:dohme@transtec.de"> <dohme@transtec.de></a>
OS/2 port of mSQL and used it to produce a Windows 95/NT version of
mSQL. This port can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/Win-mSQL/msql116b-w32.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/Win-mSQL/msql116b-w32.zip</a>
(755355 bytes)
</pre>
Peter Tillemans <a href="mailto:pti@net4all.be">
<pti@net4all.be></a> and Fernando Lozano
<a href="mailto:bl@blnet.com"> <bl@blnet.com></a> have
created the "mSQL PC Home-Page". Their work can be seen
at: <p>
<pre>
<a href="http://blnet.com/msqlpc">http://blnet.com/msqlpc</a>
</pre>
<dt><b><a name="nextstep">NeXTSTEP EOF</a></b>
<dd> Mark Onyschuk
<a href="mailto:ask-oa@oa.guild.org">
<ask-oa@oa.guild.org></a> has developed an NeXTSTEP EOF
adaptor for mSQL. <p>
An Enterprise Object Framework (EOF) is an object framework that
allows object oriented access to relational databases, where each
row is considered an object. Besides a few limitations, it
basically makes a relational database look like an OO database to
the developer. By means of an adaptor, EOF can be used with
virtually any database. The adaptor is responsible to transform the
generic OO messages in database specific queries by subclassing a
generic adaptor and modifying its behaviour. <p>
<dt><b><a name="oo-html">Object Oriented HTML API</a></b>
<dd> Sol Katz
<a href="mailto:skatz@blm.gov"><skatz@blm.gov></a> has
developed an object oriented HTML API for mSQL. <p>
It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.blm.gov/pub/gis/msql_api.tar.gz">ftp://ftp.blm.gov/pub/gis/msql_api.tar.gz</a>
(10317 bytes)
</pre>
An example can be found at
<pre>
<a href="http://www.blm.gov/gis/msql/dbs6.html">http://www.blm.gov/gis/msql/dbs6.html</a>
</pre>
<dt><b><a name="ocx">OCX</a></b>
<dd> Shayne Hughes
<a href="mailto:shayne@vgl.ucdavis.edu">
<shayne@vgl.ucdavis.edu></a> has created a 32-bit OCX control
that exposes all of the mSQL API (based on 1.0.12) with only slight
modifications to make it work with pointer impaired languages like
Visual Basic. It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://vgl.ucdavis.edu/pub/mSQL/ocxmsql-0.90.zip">ftp://vgl.ucdavis.edu/pub/mSQL/ocxmsql-0.90.zip</a>
(1685189 bytes)
</pre>
Chin-Jin Phua
<a href="mailto:jojo@ttsh.gov.sg">
<jojo@ttsh.gov.sg></a> has also developed a mSQL 32-bit OCX
for Windows95 and WinNT. He has only tested it for Visual Basic.
<pre>
<a href="ftp://Bond.edu.au/pub/Minerva/msql/Contrib/mSQLwinapi/msqlocx.zip">ftp://Bond.edu.au/pub/Minerva/msql/Contrib/mSQLwinapi/msqlocx.zip</a>
(17409 bytes)
</pre>
<dt><b><a name="odbc">ODBC</a></b>
<dd>
<ul>
<li>Dean Fuqua <a href="mailto:fuqua@niehs.nih.gov">
<fuqua@niehs.nih.gov></a> has developed a collection of ODBC
files which are available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.comed.com/pub/msql/odbc">ftp://ftp.comed.com/pub/msql/odbc</a>
</pre>
For more information on Dean's work see:
<pre>
<a href="http://alfred.niehs.nih.gov">http://alfred.niehs.nih.gov</a>
</pre>
<li> Kevin Gill <a href="mailto:kgill@kindle.ie">
<kgill@kindle.ie></a> has extended Dean's work and developed
ODBC software for connecting Visual Basic 3.0 to an mSQL server.
His work can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC</a>
</pre>
The following files give some out of date general information about
the gorta software: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gorta.faq">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gorta.faq</a>
(27450 bytes)
<a href="http://www.cyber.com.au/misc/gorta.htm">http://www.cyber.com.au/misc/gorta.htm</a>
</pre>
The gorta software operates as either a 32 bit or a 16 bit ODBC driver.
Different libraries/programs are required for each. <p>
For the 16 bit version (Windows 3.1 and 3.11) install: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlrts.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlrts.zip</a>
(11693 bytes) - Mini-SQL API DLL (Must install First)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gorta-rts.2.10.0.6.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gorta-rts.2.10.0.6.zip</a>
(17014 bytes) - Gorta Driver
</pre>
For the 32 bit version (Windows 95) install: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlr32-rts.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlr32-rts.zip</a>
(43193 bytes) - Mini-SQL API 32 bit DLL (Must Install First)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gorta32-rts.2.10.0.6.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gorta32-rts.2.10.0.6.zip</a>
(22260 bytes) - Gorta 32 bit driver
</pre>
The following test tools are available. (These are 16 bit but should
work with the 32 bit drivers). <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmslqrs.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmslqrs.zip</a>
(20257 bytes) - A DOS/Windows version of the relshow program
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortars.1.0.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortars.1.0.zip</a>
(23756 bytes) - An ODBC version of the relshow program
</pre>
To install the ODBC driver for the first time requires the use of an
install disk. This installs version 2.10.0.3 of the gorta drivers.
Install from this and then overwrite the gorta dll (in the
windows/system directory) with the one in the gorta 2.10.0.6 zip
file. The install disk installs both the 16 and 32 bit versions of
ODBC. <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/installd.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/installd.zip</a>
(225019 bytes)
</pre>
The install disk tends to replace dlls with older versions. This is
a problem if you have ODBC already running. Check the DLLs on the
disk, and make a copy of your dlls before starting. <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortars.1.0.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortars.1.0.zip</a>
(23756 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortarts.2.10.0.3.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortarts.2.10.0.3.zip</a>
(17480 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortasrc.2.10.0.3.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/gortasrc.2.10.0.3.zip</a>
(51770 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/installd.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/installd.zip</a>
(225019 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/msql-1.12-dump.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/msql-1.12-dump.tar.gz</a>
(158282 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlrs.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlrs.zip</a>
(20257 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlrts.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlrts.zip</a>
(11693 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlsrc.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLODBC/wmsqlsrc.zip</a>
(15089 bytes)
</pre>
<li> <a name="iODBC">An</a> ODBC API for Linux is available. For more
details see: <p>
<pre>
<a href="http://users.ids.net/~bjepson/freeODBC">http://users.ids.net/~bjepson/freeODBC</a>
</pre>
Dirk Ohme <a href="mailto:dohme@transtec.de">
<dohme@transtec.de></a> has ported this API to OS/2, SunOS
4.<i>x</i> and Solaris 2.<i>x</i>. This port is available via
anonymous ftp from:
<pre>
<a href="ftp://ftp.nerosworld.com/pub/SQL/iODBC/iODBC-1.00.5.zip">ftp://ftp.nerosworld.com/pub/SQL/iODBC/iODBC-1.00.5.zip</a>
(1023149 bytes)
</pre>
<li> Ian Nicholls <a href="mailto:iann@ram.net.au">
<iann@ram.net.au></a> of Ram Network Services has developed
a Delphi class that will interface with mSQL version 1.<i>x</i>.
Ian also reports that they have a C++ version which runs under
Linux. He stresses that the code is still only in its beta test
phase but is "getting stronger every day". <p>
For more details please send some mail to Ian at
<a href="mailto:iann@ram.net.au"> <iann@ram.net.au></a>.
</ul>
<p>
<dt><b><a name="onyx">Onyx</a></b>
<dd> Michael Koehne
<a href="mailto:kraehe@bakunin.north.de">
<kraehe@bakunin.north.de></a> has developed a rapid
prototyping tool for database applications called Onyx. <p>
Onyx consists of a transaction manager, a shell like 4GL and a
Simple Database Transaction Protocol engine. <p>
"Onyx is designed by the Model-View-Controller paradigm, so
tables are the model, masks are the views and transactions are the
controllers which can be bound to an input field, a menu, function
keys or the change of the current record in a cursor." <p>
It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.uni-bremen.de/pub/unix/database/Onyx/Onyx.2.45.src.tar.gz">ftp://ftp.uni-bremen.de/pub/unix/database/Onyx/Onyx.2.45.src.tar.gz</a>
(195872 bytes)
</pre>
<dt>(=) <b><a name="oscafe">Open Systems Cafe</a></b>
<dd> Rich Bryant <a href="mailto:rbb@iseek.com">
<rbb@iseek.com></a> and Julian Pickard
<a href="mailto:julian@iseek.com"> <julian@iseek.com></a>
have established the Open Systems Cafe. "The Cafe is designed
to be an up to date information clearing house for anything
associated with open systems computing". The Cafe has a
discussion area dedicated to mSQL. For more details see:
<pre>
<a href="http://iseek.com/Cafe">http://iseek.com/Cafe</a>
</pre>
<dt><b><a name="os2">OS/2</a></b>
<dd> Dirk Ohme
<a href="mailto:dohme@transtec.de">
<dohme@transtec.de></a> has ported mSQL 1.0.16 to OS/2. This
version now includes an ODBC-compliant manager/driver within the
package. It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql116e.lsm">ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql116e.lsm</a>
(1913 bytes)
<a href="ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql116e.zip">ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql116e.zip</a>
(871729 bytes)
</pre>
Dirk has also finished a beta version of mSQL 2.0 for OS/2. This
release is based on mSQL 2.0B6. It is available via anonymous ftp
from: <p>
<pre>
<a href="ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql20b6.lsm">ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql20b6.lsm</a>
(2228 bytes)
<a href="ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql20b6.zip">ftp://ftp.nerosworld.com/pub/msql/contrib/mSQLOS2/msql20b6.zip</a>
(1865128 bytes)
</pre>
This version also requires Dirk's intrinsic ODBC package. For
details regarding this package see the
<a href="#iODBC">"ODBC"</a> section above. <p>
<dt><b><a name="perl">Perl</a></b>
<dd> Andreas Koenig
<a href="mailto:a.koenig@mind.de"><a.koenig@mind.de></a> has
contributed a Perl 5 module which allows perl to interface to mSQL
databases. The latest version is available via anonymous ftp from
any of the CPAN archives, for example: <p>
<pre>
<a href="ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-category/07_Database_Interfaces/Msql">ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-category/07_Database_Interfaces/Msql</a>
</pre>
For more information about CPAN see: <p>
<pre>
<a href="ftp://ftp.funet.fi/pub/languages/perl/CPAN">ftp://ftp.funet.fi/pub/languages/perl/CPAN</a>
</pre>
There is a mailing list for MsqlPerl. Send postings to
<a href="mailto:msqlperl@franz.ww.tu-berlin.de">
<msqlperl@franz.ww.tu-berlin.de></a>. <p>
<dt><b><a name="php">PHP - Home Page Construction Kit</a></b>
<dd> Rasmus Lerdorf
<a href="mailto:rasmus@vex.net"><rasmus@vex.net></a> has
developed a package that allows users to create WWW sites with mSQL
databases. <p>
Rasmus writes: <p>
<pre>
PHP/FI is a server-side html-embedded scripting language with
built-in access logging, access restriction, as well as support for
ndbm, gdbm and mSQL databases. It also implements the RFC-1867
standard for form-based file uploads.
The mSQL support is just a small set of functions supported by the
package. A full set of string manipulation, regular expression,
directory and file routines complement the script language.
</pre>
The source distribution as well as more information is available
at: <p>
<pre>
<a href="http://www.vex.net/php">http://www.vex.net/php</a>
</pre>
<dt><b><a name="pts">PTS</a></b>
<dd> Dave Shevett <a href="mailto:shevett@homeport.org">
<shevett@homeport.org></a> has developed a web based project
tracking system - PTS. It used mSQL and PHP/FI. For more details
see: <p>
<pre>
<a href="http://www.homeport.org/~shevett/pts">http://www.homeport.org/~shevett/pts</a>
</pre>
<dt><b><a name="python">Python</a></b>
<dd> Anthony Baxter
<a href="mailto:anthony.baxter@aaii.oz.au">
<anthony.baxter@aaii.oz.au></a> has provided an mSQL
extension to the Python language. It is available via anonymous ftp
from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLPython/PymSQL.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLPython/PymSQL.tar.gz</a>
(7581 bytes)
</pre>
Mark Shuttleworth
<a href="mailto:marks@aztec.co.za">
<marks@aztec.co.za></a> has improved upon Anthony's original
work. Mark's work is available via anonymous ftp from: <p>
<pre>
<a href="http://www.python.org/ftp/python/contrib/Database/mSQL.tar.gz">http://www.python.org/ftp/python/contrib/Database/mSQL.tar.gz</a>
(6000 bytes)
</pre>
Jeffrey Ollie <a href="mailto:jeff@ollie.clive.ia.us">
<jeff@ollie.clive.ia.us></a> has updated the Python module
for use with both mSQL version 1.<i>x</i> and 2.<i>x</i>. More
details can be found at: <p>
<pre>
<a href="http://www.ollie.clive.ia.us/python/msql">http://www.ollie.clive.ia.us/python/msql</a>
</pre>
<dt><b><a name="radius">RADIUS</a></b>
<dd> Tracy Snell <a href="mailto:waz@enteract.com">
<waz@enteract.com></a> has modified
<a href="http://www.livingston.com">Livingston's</a> RADIUS
security server to place accounting records in an mSQL database.
For more details see: <p>
<pre>
<a href="http://www.enteract.com/isp">http://www.enteract.com/isp</a>
</pre>
According to Damian Hamill <a href="mailto:damian@cablenet.net">
<damian@cablenet.net></a>, the RADIUS server bundled with
<a href="http://www.cablenet.net"> Cablenet's</a>
<a href="http://www.cablenet.net/cablenet/popinabox">PoP In A
Box</a> ISP server software also supports mSQL based accounting
records. For more details see: <p>
<pre>
<a href="http://www.cablenet.net/cablenet/popinabox">http://www.cablenet.net/cablenet/popinabox</a>
</pre>
<dt><b><a name="rexx">REXX</a></b>
<dd> Mark Hessling
<a href="mailto:m.hessling@qut.edu.au">
<m.hessling@qut.edu.au></a> has provided an mSQL extension to
REXX under Un*x and <a href="#os2">OS/2</a>. It is available via
anonymous ftp from the following sites: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX</a>
<a href="ftp://ftp.qut.edu.au/src/REXXSQL">ftp://ftp.qut.edu.au/src/REXXSQL</a>
<a href="ftp://ftp.xylogics.com/pub/misc/REXXSQL">ftp://ftp.xylogics.com/pub/misc/REXXSQL</a>
</pre>
You'll need to download the following files: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX/rxsqldoc13.lsm">rxsqldoc13.lsm</a> (1014 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX/rxsqldoc13.zip">rxsqldoc13.zip</a> (39170 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX/rxsqlmin13.lsm">rxsqlmin13.lsm</a> (1001 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX/rxsqlmin13.zip">rxsqlmin13.zip</a> (156525 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX/rxsqlsam13.lsm">rxsqlsam13.lsm</a> (1014 bytes)
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLREXX/rxsqlsam13.zip">rxsqlsam13.zip</a> (25299 bytes)
</pre>
<dt><b><a name="simple-sql">Simple SQL</a></b>
<dd> Brian Jepson
<a href="mailto:bjepson@janus.saturn.net">
<bjepson@janus.saturn.net></a> has developed a fairly
full-featured database management system toolkit using
<a href="#php">PHP</a> and mSQL. It is available from: <p>
<pre>
<a href="http://www.saturn.net/~bjepson/simple.html">http://www.saturn.net/~bjepson/simple.html</a>
</pre>
Brian has begun work on the successor to Simple SQL. Msql-RDBMS
"will eventually be a complete relational database management
system for Msql. It uses HTML forms as an interface". It is
available from: <p>
<pre>
<a href="http://www.perl.com/CPAN/modules/by-module/Msql">http://www.perl.com/CPAN/modules/by-module/Msql</a>
</pre>
<dt><b><a name="sqlbase">SQLBase</a></b>
<dd> Klaus Thiele
<a href="mailto:kth@oblib.teuto.de"><kth@oblib.teuto.de></a>
has provided a wrapper to allow SQLBase users to interface to mSQL
databases. It is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLBase/mSQLBase-1.00.tgz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLBase/mSQLBase-1.00.tgz</a>
</pre>
<dt><b><a name="tcl">Tcl</a></b>
<dd> Hakan Soderstrom
<a href="mailto:hs@soderstrom.se"><hs@soderstrom.se></a> has
provided an mSQL extension to the Tcl language. It has been tested
with Tcl 7.5, Tk 4.1 and mSQL 1.0.16 under SunOS 4.1.4. Successful
ports to several other platforms have been reported. It is
available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLTCL/msqltcl-1.99.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLTCL/msqltcl-1.99.tar.gz</a>
(69356 bytes)
</pre>
<dd> Brad Pepers
<a href="mailto:pepersb@cuug.ab.ca"><pepersb@cuug.ab.ca></a>
has also provided an mSQL extension to Tcl. According to the
documentation it supports tcl7.3 and tk3.6. It is available via
anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLTCL/tcl_msql.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLTCL/tcl_msql.tar.gz</a>
(7998 bytes)
</pre>
<dt><b><a name="time-utils">Time and date utilities</a></b>
<dd> Pascal Forget
<a href="mailto:pascal@wsc.com"><pascal@wsc.com></a> has
contributed a library of time and date conversion utilities. It is
available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLtime/time_library.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLtime/time_library.tar.gz</a>
(7989 bytes)
</pre>
<dt><b><a name="tkmsql">tkmSQL</a></b>
<dd> Alligator Decartes
<a href="mailto:descarte@hermetica.com">
<descarte@hermetica.com></a> is developing an mSQL interface
that uses Perl 5, Tk, and DBD/DBD-mSQL. It is currently in alpha
release for developers only but Alligator would appreciate
<a href="mailto:descarte@hermetica.com">feedback</a>. <p>
tkmSQL requires: <p>
<ul>
<li> perl 5.001m or above
<li> Tk-b8 <p>
<b>Note:</b> This is a perl Tk module and is NOT to be confused
with Tk itself. It can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.wpi.edu/perl5">ftp://ftp.wpi.edu/perl5</a>
</pre>
There is also a FAQ available from: <p>
<pre>
<a href="http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.html">http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.html</a>
</pre>
<li> <a href="#dbi">DBI-0.65</a>
<li> <a href="#dbd-msql">DBD::mSQL-0.60pl9</a>
</ul>
<p>
You may obtain tkmSQL via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.mcqueen.com/pub/databases/dbatools/tkmSQL">ftp://ftp.mcqueen.com/pub/databases/dbatools/tkmSQL</a>
</pre>
<dt><b><a name="sgs">Unique sequence number generator</a></b>
<dd> Pascal Forget
<a href="mailto:pascal@wsc.com"><pascal@wsc.com></a> has
contributed a unique sequence number generator that can be used by
mSQL applications (and others) to provide unique identifiers. It is
available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLsgs/sgs-1.0.0.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLsgs/sgs-1.0.0.tar.gz</a>
(24216 bytes)
</pre>
<dt><b><a name="vdb">Virtual Database</a></b>
<dd> Damian Hamill <a href="mailto:damian@cablenet.net">
<damian@cablenet.net></a> has written a virtual database
layer that sits between your application and mSQL. This provides a
level of abstraction between your application and the database
back end such that it becomes a fairly simple matter to change
database systems without changing your application code. The
current version is available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLVdb/Vdb.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLVdb/Vdb.tar.gz</a>
(61670 bytes)
</pre>
Damian is working on the next release which will include support
for a number of different database engines such as mSQL, mysql,
Sybase and Informix. <p>
<dt><b><a name="virtuflex">VirtuFlex</a></b>
<dd> VirtuFlex Software has added mSQL support to their web/database
development tool VirtuFlex. More details can be seen at: <p>
<pre>
<a href="http://www.virtuflex.com">http://www.virtuflex.com</a>
</pre>
<dt><b><a name="visual-basic">Visual Basic</a></b>
<dd> Jim Gerace
<a href="mailto:kasi@dreamscape.com">
<kasi@dreamscape.com></a> has implemented a
Visual Basic client API for MS Windows and mSQL. It is available
via anonymous ftp from:
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLVB/msqlcvb.zip">ftp://bond.edu.au/pub/Minerva/msql/Contrib/mSQLVB/msqlcvb.zip</a>
(42192 bytes)
</pre>
<dt><b><a name="wdb">WDB</a></b>
<dd> Bo Frese Rasmussen
<a href="mailto:bfr@dtv.dk"><bfr@dtv.dk></a> has
developed a Web database interface called WDB. <p>
WDB is a software tool set that tremendously simplifies the
integration of SQL based databases into the World Wide Web. WDB
lets you provide WWW access to the contents of databases without
writing a single line of code! <p>
At the moment WDB supports Sybase, Informx and mSQL. However it is
relatively easy to port it to other SQL based databases. <p>
For more details on WDB see: <p>
<pre>
<a href="http://www.dtv.dk/~bfr/wdb">http://www.dtv.dk/~bfr/wdb</a>
</pre>
Jeff Rowe <a href="mailto:beowulf@cscsun4.larc.nasa.gov">
<beowulf@cscsun4.larc.nasa.gov></a> has published a tutorial
on enhancing WDB. Details can be found at: <p>
<pre>
<a href="http://cscsun1.larc.nasa.gov/~beowulf/tutor/index.html">http://cscsun1.larc.nasa.gov/~beowulf/tutor/index.html</a>
</pre>
<dt><b><a name="websql">Websql</a></b>
<dd> Henry Minsky
<a href="mailto:hqm@ua.com"><hqm@ua.com></a> has developed an
mSQL Table WWW browser interface. <p>
"This is a C web CGI script to examine and modify rows in
tables of an mSQL database. You should use Netscape or another
browser which supports HTML 3.0 tables." <p>
More details and sample output are available from: <p>
<pre>
<a href="http://www.ua.com/websql">http://www.ua.com/websql</a>
</pre>
Source code is available from: <p>
<pre>
<a href="http://www.ua.com/websql/websql.tar.gz">http://www.ua.com/websql/websql.tar.gz</a>
(24225 bytes)
</pre>
<dt><b><a name="tryc-repository">Wojciech Tryc's Repository</a></b>
<dd> Wojciech Tryc <a href="mailto:wojtek@tryc.on.ca">
<wojtek@tryc.on.ca></a> has established a repository of mSQL
and PHP contributed software. It can be found at: <p>
<pre>
<a href="http://solaris.tryc.on.ca/files/files.phtml">http://solaris.tryc.on.ca/files/files.phtml</a>
</pre>
<dt><b><a name="xfsql">XfSQL</a></b>
<dd> Mark Loveland
<a href="mailto:mark@zeus.mysticgrp.com">
<mark@zeus.mysticgrp.com></a> has developed an X interface to
mSQL using the Xforms package. Mark's work is available via
anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/XfSQL/xfsql.tar.gz">ftp://bond.edu.au/pub/Minerva/msql/Contrib/XfSQL/xfsql.tar.gz</a>
(74596 bytes)
</pre>
Xforms is available for a number of different platforms via
anonymous ftp from either of the following locations: <p>
<pre>
<a href="ftp://einstein.phys.uwm.edu/pub/xforms">ftp://einstein.phys.uwm.edu/pub/xforms</a>
</pre>
<dt><b><a name="xsqlmenu">Xsqlmenu</a></b>
<dd> Kees Lemmens
<a href="mailto:lemmens@dv.twi.tudelft.nl">
<lemmens@dv.twi.tudelft.nl></a> has also developed an X
interface to mSQL using the Xforms package. Xsqlmenu can be
obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://ta.twi.tudelft.nl/pub/dv/lemmens/xsqlmenu_1.02s.tar.gz">ftp://ta.twi.tudelft.nl/pub/dv/lemmens/xsqlmenu_1.02s.tar.gz</a>
(14973 bytes)
</pre>
A pre compiled binary for Linux is also available via anonymous ftp
from: <p>
<pre>
<a href="ftp://ta.twi.tudelft.nl/pub/dv/lemmens/xsqlmenu_1.02LinuxBin.tar.gz">ftp://ta.twi.tudelft.nl/pub/dv/lemmens/xsqlmenu_1.02LinuxBin.tar.gz</a>
(130945 bytes)
</pre>
Xforms is available for a number of different platforms via
anonymous ftp from either of the following locations: <p>
<pre>
<a href="ftp://einstein.phys.uwm.edu/pub/xforms">ftp://einstein.phys.uwm.edu/pub/xforms</a>
</pre>
Kees has upgraded Xsqlmenu to support mSQL 2.<i>x</i>. Source code
is available via anonymous ftp from: <p>
<pre>
<a href="ftp://ta.twi.tudelft.nl/pub/dv/lemmens/xsqlmenu.2.01b.tar.gz">ftp://ta.twi.tudelft.nl/pub/dv/lemmens/xsqlmenu.2.01b.tar.gz</a>
(18601 bytes)
</pre>
<dt><b><a name="cplusplus">Z Classes for C++</a></b>
<dd> Dean Fuqua
<a href="mailto:fuqua@niehs.nih.gov">
<fuqua@niehs.nih.gov></a> has also contributed a set of C++
classes to provide access to both Oracle and mSQL databases. It is
available via anonymous ftp from: <p>
<pre>
<a href="ftp://bond.edu.au/pub/Minerva/msql/Contrib/zmSQL/zmsql-2.1.tar">ftp://bond.edu.au/pub/Minerva/msql/Contrib/zmSQL/zmsql-2.1.tar</a>
(40960 bytes)
</pre>
</dl>
<hr>
<center>
<h2><a name="web-sites">Web sites using mSQL</a></h2>
</center>
The following web sites are using mSQL as the database component of their
pages. <p>
<center>
<table border=3 cellpadding=3 bgcolor="#cccccc">
<tr>
<td>
<a href="#3d-planet">3D Planet</a>
</td>
<td>
<a href="#isp">ISP Listing</a>
</td>
</tr>
<tr>
<td>
<a href="#allens-flowers">Allen's Flowers</a>
</td>
<td>
<a href="#kelloggs">Kelloggs</a>
</td>
</tr>
<tr>
<td>
<a href="#aussie-index">Aussie Index</a>
</td>
<td>
<a href="#kids-health">Kids Health</a>
</td>
</tr>
<tr>
<td>
<a href="#bishop-museum">Bishop Museum, Honolulu</a>
</td>
<td>
<a href="#mahrens-addressbook">Matthew Ahrens' Address Book</a>
</td>
</tr>
<tr>
<td>
<a href="#bond-staff">Bond University Staff Index</a>
</td>
<td>
<a href="#mondo-db">Mondo-DB Project</a>
</td>
</tr>
<tr>
<td>
<a href="#borsen">Borsen</a>
</td>
<td>
<a href="#nerosworld">Nero's World</a>
</td>
</tr>
<tr>
<td>
<a href="#canadait">CanadaIT</a>
</td>
<td>
<a href="#netcal">NetCal!</a>
</td>
</tr>
<tr>
<td>
<a href="#cinemabrazil">Cinema Brazil</a>
</td>
<td>
<a href="#newshare">Newshare Corporation</a>
</td>
</tr>
<tr>
<td>
<a href="#consecol">Conservation Ecology</a>
</td>
<td>
<a href="#ncid">North Carolina Insurance Database</a>
</td>
</tr>
<tr>
<td>
<a href="#cyberclip">CyberClip</a>
</td>
<td>
<a href="#opc">Ontario Prevention Clearinghouse</a>
</td>
</tr>
<tr>
<td>
<a href="#dmx-cables">DMX Cable Systems</a>
</td>
<td>
<a href="#paulinasprings">Paulina Springs Book Company</a>
</td>
</tr>
<tr>
<td>
<a href="#dave-gizmo">Dave 'Gizmo' Gymer</a>
</td>
<td>
<a href="#physics">Physics Pilot</a>
</td>
</tr>
<tr>
<td>
<a href="#europractice">EUROPRACTICE</a>
</td>
<td>
<a href="#qms">QMS</a>
</td>
</tr>
<tr>
<td>
<a href="#ewse-org">European Wide Service Exchange</a>
</td>
<td>
<a href="#querri">QUERRI Bibliographic Server</a>
</td>
</tr>
<tr>
<td>
<a href="#first-byte">First Byte Data Systems</a>
</td>
<td>
<a href="#railway">The Railway Exchange</a>
</td>
</tr>
<tr>
<td>
<a href="#gcrc">Government Contractor Resource Center</a>
</td>
<td>
<a href="#used-gear">Used gear price list</a>
</td>
</tr>
<tr>
<td>
(=) <a href="#iecafe">Internet Employment Cafe</a>
</td>
<td>
<a href="#web-ventures">Web Ventures</a>
</td>
</tr>
<tr>
<td>
<a href="#iq-now">The IQ NOW Member Directory</a>
</td>
<td>
<a href="#wise">Web Integrated Software metrics Environment</a>
</td>
</tr>
</table>
</center>
<p>
<dl>
<dt><b><a name="3d-planet">3D Planet</a></b>
<dd> Mark Mazur
<a href="mark@opencad.com"><mark@opencad.com></a>
uses mSQL and <a href="#php">The Personal Home Page Construction
Kit </a> to enable users to find the nearest 3D Planet store. This
page can be seen at: <p>
<pre>
<a href="http://www.3dplanet.com/d5.html">http://www.3dplanet.com/d5.html</a>
</pre>
<dt><b><a name="allens-flowers">Allen's Flowers</a></b>
<dd> As you might expect, Allen's Flowers sells flowers. They use
mSQL to drive their ordering system. Their web site can be seen
at: <p>
<pre>
<a href="http://www.allensflowers.com">http://www.allensflowers.com</a>
</pre>
<dt><b><a name="aussie-index">Aussie Index</a></b>
<dd> Aussie.com.au uses mSQL to collate its list of Australian Web
sites. Their web page can be seen at: <p>
<pre>
<a href="http://www.aussie.com.au">http://www.aussie.com.au</a>
</pre>
<dt><b><a name="bishop-museum">Bishop Museum, Honolulu</a></b>
<dd> Jeffrey Sue
<a href="mailto:jysue@aloha.net"><jysue@aloha.net></a>
has used mSQL and Rasmus Lerdorf's <a href="#php">PHP</a>
package to create the first of several web based
biology related databases. The first database is the arthropod
checklist, a list of all known arthropods found in the Hawaiian
Islands. The
next databases will be additional checklists, starting with
flowering
plants. It can be seen at: <p>
<pre>
<a href="http://www.bishop.hawaii.org/bishop/HBS/arthrosearch.html">http://www.bishop.hawaii.org/bishop/HBS/arthrosearch.html</a>
</pre>
<dt><b><a name="bond-staff">Bond University Staff Index</a></b>
<dd> The staff index at Bond University, Queensland Australia uses
mSQL to power its staff address database. See their web page for
more details: <p>
<pre>
<a href="http://www.Bond.edu.au/Bond/General/MParse/mparse.html">http://www.Bond.edu.au/Bond/General/MParse/mparse.html</a>
</pre>
<dt><b><a name="borsen">Borsen</a></b>
<dd> This Danish site uses mSQL as its databases for searches. I
can't give more information as it is all in Danish and my Danish
is truly awful. For more details visit: <p>
<pre>
<a href="http://www.borsen.dk">http://www.borsen.dk</a>
</pre>
<dt><b><a name="canadait">CanadaIT</a></b>
<dd> CanadaIT limited uses mSQL. Their web page can be seen at:
<p>
<pre>
<a href="http://www.CanadaIT.com"> http://www.CanadaIT.com</a>
</pre>
<dt><b><a name="cinemabrazil">Cinema Brazil</a></b>
<dd> Marcos Manhaes Marins
<a href="mailto:cinemabrazil@ax.apc.org">
<cinemabrazil@ax.apc.org></a> has used mSQL to power the
search engine behind the Cinema Brazil web site. For more details
see: <p>
<pre>
<a href="http://www.ibase.org.br/~cinemabrazil">http://www.ibase.org.br/~cinemabrazil</a>
</pre>
<dt><b><a name="consecol">Conservation Ecology Journal</a></b>
<dd> Darryl Staflund <a href="dstaflun@ccs.carleton.ca">
<dstaflun@ccs.carleton.ca></a> uses mSQL behind the online
journal Conservation Ecology. It can be seen at: <p>
<pre>
<a href="http://www.consecol.org">http://www.consecol.org</a>
</pre>
<dt><b><a name="cyberclip">CyberClip</a></b>
<dd> CyberClip uses mSQL to power its Shopper's Index search engine.
Their web page can be seen at: <p>
<pre>
<a href="http://www.cyberclip.com">http://www.cyberclip.com</a>
</pre>
<dt><b><a name="dmx-cables">DMX Cables</a></b>
<dd> Digital Music Express uses mSQL to allow users to search for
DMX cable service providers in their area. Their web site can be
seen at: <p>
<pre>
<a href="http://www.dmxmusic.com">http://www.dmxmusic.com</a>
</pre>
<dt><b><a name="dave-gizmo">Dave 'Gizmo' Gymer</a></b>
<dd> Dave Gymer
<a href="mailto:dgymer@gdcarc.co.uk">
<dgymer@gdcarc.co.uk></a> has used mSQL and Dean Fuqua's
<a href="#cplusplus">zclass</a> C++ classes to provide a web based
database system for his collection of compact discs. The CD
collection and the source code can be seen at: <p>
<pre>
<a href="http://www.mal.com/~dgymer/gizmo/music.html">http://www.mal.com/~dgymer/gizmo/music.html</a>
</pre>
<dt><b><a name="europractice">EUROPRACTICE</a></b>
<dd> EUROPRACTICE is an ASIC manufacturing service. Their home
page can be found at: <p>
<pre>
<a href="http://www.imec.be/europractice/europractice.html">http://www.imec.be/europractice/europractice.html</a>
</pre>
<dt><b><a name="ewse-org">European Wide Service Exchange</a></b>
<dd> The <a href="http://ewse.ceo.org">European Wide Service
Exchange</a> uses mSQL extensively. Apart from a user registration
and customization service, complex relational tables allow context
sensitive searching, both by geographic area as well as by 'free
text'. Further functionality relying on mSQL includes urn->urc
resolution services, calendars and an automatic 'what is new page'.
What makes this site unique however is the ability for the user to
add, modify or remove data entries from the databases through a web
interface. <p>
Their home page can be found at: <p>
<pre>
<a href="http://ewse.ceo.org">http://ewse.ceo.org</a>
</pre>
<dt><b><a name="first-byte">First Byte Data Systems</a></b>
<dd> First Byte Data Systems uses mSQL to power its product search
engine. Their home page can be seen at: <p>
<pre>
<a href="http://www.first-byte.com">http://www.first-byte.com</a>
</pre>
<dt><b><a name="gcrc">Government Contractor Resource Center</a></b>
<dd> The Government Contractor Resource Center provides
information for companies wishing to provide contractual services
to United States Government bodies. Their web site can be seen at:
<p>
<pre>
<a href="http://www.govcon.com">http://www.govcon.com</a>
</pre>
<dt>(=) <b><a name="iecafe">Internet Employment Cafe</a></b>
<dd> The Employment Services Department of the University of
Western Ontario has established an Internet Employment Cafe
powered by mSQL. It can be seen at: <p>
<pre>
<a href="http://cafe.sdc.uwo.ca">http://cafe.sdc.uwo.ca</a>
</pre>
<dt><b><a name="iq-now">The IQ Now Member Directory</a></b>
<dd> IQ Now provides information on healthcare services. Their web
site is at: <p>
<pre>
<a href="http://www.iqnow.com">http://www.iqnow.com</a>
</pre>
<dt><b><a name="isp">ISP Listing</a></b>
<dd> Rasmus Lerdorf
<a href="mailto:rasmus@vex.net"><rasmus@vex.net></a>
has used mSQL and PHP/FI to maintain a list of Internet Service
Providers. His work can be seen at: <p>
<pre>
<a href="http://www.vex.net/isp">http://www.vex.net/isp</a>
</pre>
<dt><b><a name="kelloggs">Kelloggs</a></b>
<dd> Kelloggs (the Corn Flakes people) use mSQL. Their web site can
be seen at: <p>
<pre>
<a href="http://www.kelloggs.com">http://www.kelloggs.com</a>
</pre>
<dt><b><a name="kids-health">Kids Health</a></b>
<dd> KidsHealth is a resource centre for matters relating to
children's health. See their home page at: <p>
<pre>
<a href="http://KidsHealth.org">http://KidsHealth.org</a>
</pre>
<dt> <b><a name="mahrens-addressbook">Matthew Ahrens' Address Book</a></b>
<dd> Matthew Ahrens
<a href="mailto:matt@callnet.com">
<matt@callnet.com></a> has written a Web based address book.
It uses Perl and mSQL. It can be found at: <p>
<pre>
<a href="http://www.callnet.com/~matt">http://www.callnet.com/~matt</a>
</pre>
<dt><b><a name="mondo-db">Mondo-DB Project</a></b>
<dd> Rose-Hulman Institute of Technology is using mSQL to manage
much of its Unix networking data. Their work can be seen at: <p>
<pre>
<a href="http://www.rose-hulman.edu/~allard/Mondo-DB/oindex.html">http://www.rose-hulman.edu/~allard/Mondo-DB/oindex.html</a>
</pre>
<dt><b><a name="nerosworld">Nero's World</a></b>
<dd> David Perry <a href="mailto:deperry@nerosworld.com">
<deperry@nerosworld.com></a> uses mSQL extensively to drive
his web server. Examples of his work can be seen at: <p>
<pre>
<a href="http://www.nerosworld.com/realestate/">http://www.nerosworld.com/realestate/</a>
<a href="http://www.nerosworld.com/business/">http://www.nerosworld.com/business/</a>
<a href="http://www.nerosworld.com/tradingpost/">http://www.nerosworld.com/tradingpost/</a>
<a href="http://www.nerosworld.com/fstop/">http://www.nerosworld.com/fstop/</a>
<a href="http://www.nerosworld.com/nero/zipcode.htm">http://www.nerosworld.com/nero/zipcode.htm</a>
<a href="http://www.nerosworld.com/romancing_the_web/">http://www.nerosworld.com/romancing_the_web/</a>
</pre>
<dt><b><a name="netcal">NetCal!</a></b>
<dd> NetCal! is an interactive calendar system. It can be found
at: <p>
<pre>
<a href="http://www.itribe.net/netcal">http://www.itribe.net/netcal</a>
</pre>
<dt><b><a name="newshare">Newshare Corporation</a></b>
<dd> Newshare Corporation is an internet news broker. Their home
page can be seen at: <p>
<pre>
<a href="http://www.newshare.com">http://www.newshare.com</a>
</pre>
<dt><b><a name="ncid">North Carolina Insurance Database</a></b>
<dd> North Carolina Insurance Database provides a registry of
insurance providers in North Carolina. They can be found at: <p>
<pre>
<a href="http://www.nc-insurance.com">http://www.nc-insurance.com</a>
</pre>
<dt><b><a name="opc">Ontario Prevention Clearinghouse</a></b>
<dd> Ontario Prevention Clearinghouse provides a resource centre
for community based programs. Their home page can be found at: <p>
<pre>
<a href="http://www.opc.on.ca">http://www.opc.on.ca</a>
</pre>
<dt><b><a name="paulinasprings">Paulina Springs Book Company</a></b>
<dd> The Paulina Springs Book Company uses mSQL and PHP/FI to help
drive it's web site. Visit it at: <p>
<pre>
<a href="http://www.paulinasprings.com">http://www.paulinasprings.com</a>
</pre>
<dt><b><a name="physics">Physics Pilot</a></b>
<dd> Kenneth Holmlund
<a href="mailto:Kenneth.Holmlund@TP.UmU.SE">
<Kenneth.Holmlund@TP.UmU.SE></a> from the Department of
Theoretical Physics at Umee University in Sweden has used mSQL and
<a href="#php">The Personal Home Page Construction Kit</a> to
create the "The Internet Pilot to Physics". It can be
seen at: <p>
<pre>
<a href="http://www.tp.umu.se/TIPTOP">http://www.tp.umu.se/TIPTOP</a>
</pre>
<dt><b><a name="qms">QMS</a></b>
<dd> James Hill
<a href="mailto:james_hill@iscclink.is.qms.com">
<james_hill@iscclink.is.qms.com></a> has used mSQL and
<a href="#php">The Personal Home Page Construction Kit</a> to
create a searchable web based FAQ for QMS printers. It can be seen
at: <p>
<pre>
<a href="http://www.qms.com/www/faq">http://www.qms.com/www/faq</a>
</pre>
James has made the source code available via anonymous ftp. It can
be downloaded from: <p>
<pre>
<a href="ftp://ftp.qms.com/pub/mktg/outgoing/SupportBase.tar.gz">ftp://ftp.qms.com/pub/mktg/outgoing/SupportBase.tar.gz</a>
(5509 bytes)
</pre>
<dt><b><a name="querri">QUERRI Bibliographic Server</a></b>
<dd> QUERRI or "Questions on University Regional Resource
Information" is an online database with bibliographic
information on more than 15,000 educational resources within the
United States. It can be accessed at: <p>
<pre>
<a href="http://idea.exnet.iastate.edu:8080">http://idea.exnet.iastate.edu:8080</a>
</pre>
<dt><b><a name="railway">The Railway Exchange</a></b>
<dd> Lester Hightower
<a href="hightowe@scri.fsu.edu"><hightowe@scri.fsu.edu></a>
uses mSQL to power his web pages on model railway equipment. They
can be seen at: <p>
<pre>
<a href="http://www.railwayex.com/">http://www.railwayex.com/</a>
</pre>
<dt><b><a name="used-gear">Used gear price list</a></b>
<dd> Neil Bradley
<a href="mailto:neil@synthcom.com"><neil@synthcom.com></a>
has used mSQL to provide a price list for second hand music
equipment. A demonstration of this system is available at <p>
<pre>
<a href="http://www.synthcom.com/cgi-bin/gear">http://www.synthcom.com/cgi-bin/gear</a>
</pre>
and the source code can be obtained via anonymous ftp from: <p>
<pre>
<a href="ftp://ftp.synthcom.com/pub/stuff">ftp://ftp.synthcom.com/pub/stuff</a>
</pre>
<dt><b><a name="virtubank">Virtubank</a></b>
<dd>
<pre>
<a href="http://w3.e-sense.net/e-sense/Experimental/Virtu">http://w3.e-sense.net/e-sense/Experimental/Virtu</a>
</pre>
<dt><b><a name="web-ventures">Web Ventures</a></b>
<dd> Web Ventures provides WWW services to business. Their home
page can be seen at: <p>
<pre>
<a href="http://www.webventures.com.au">http://www.webventures.com.au</a>
</pre>
<dt><b><a name="wise">Web Integrated Software metrics Environment</a></b>
<dd> The Web Integrated Software metrics Environment (WISE)
is a project management system with a WWW interface and an mSQL
back end. Details can be found at: <p>
<pre>
<a href="http://research.ivv.nasa.gov/projects/WISE/wise.html">http://research.ivv.nasa.gov/projects/WISE/wise.html</a>
</pre>
</dl>
<hr>
<hr>
<!-- End of Part 4 -->
</body>
</html>
|