aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authoronefang2021-09-09 14:41:13 +1000
committeronefang2021-09-09 14:41:13 +1000
commitcc2945a25962e3c4ba352a0266ffb332b8e67506 (patch)
tree89b3ebc1f00d5124e4f1b7763c22e7131b886281 /src
parentMake the web directory world readable. (diff)
downloadopensim-SC-cc2945a25962e3c4ba352a0266ffb332b8e67506.zip
opensim-SC-cc2945a25962e3c4ba352a0266ffb332b8e67506.tar.gz
opensim-SC-cc2945a25962e3c4ba352a0266ffb332b8e67506.tar.bz2
opensim-SC-cc2945a25962e3c4ba352a0266ffb332b8e67506.tar.xz
Deal with database tables not existing while we wait for ROBUST to start up and create them.
Diffstat (limited to '')
-rw-r--r--src/sledjchisl/sledjchisl.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 0bc696b..3e21d10 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -3804,6 +3804,20 @@ my_ulonglong dbCount(char *table, char *where)
3804 free(sql); 3804 free(sql);
3805 return ret; 3805 return ret;
3806 } 3806 }
3807
3808 int e = mysql_errno(database); // Five different "table doesn't exist" errors? lol
3809 if (
3810 (1051 == e) || // 1051 42S02 ER_BAD_TABLE_ERROR Unknown table '%s'
3811 (1146 == e) || // 1146 42S02 ER_NO_SUCH_TABLE Table '%s.%s' doesn't exist
3812 (1168 == e) || // 1168 HY000 ER_WRONG_MRG_TABLE Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
3813 (1177 == e) || // 1177 42000 ER_CHECK_NO_SUCH_TABLE Can't open table
3814 (1472 == e) // 1472 HY000 ER_ADMIN_WRONG_MRG_TABLE Table '%s' is differently defined or of non-MyISAM type or doesn't exist
3815 )
3816 {
3817 W("Table %s doesn't exist. Yet.", table);
3818 free(sql);
3819 return 0;
3820 }
3807 } 3821 }
3808 else 3822 else
3809 { 3823 {
@@ -3859,6 +3873,20 @@ my_ulonglong dbCountJoin(char *table, char *select, char *join, char *where)
3859 free(sql); 3873 free(sql);
3860 return ret; 3874 return ret;
3861 } 3875 }
3876
3877 int e = mysql_errno(database); // Five different "table doesn't exist" errors? lol
3878 if (
3879 (1051 == e) || // 1051 42S02 ER_BAD_TABLE_ERROR Unknown table '%s'
3880 (1146 == e) || // 1146 42S02 ER_NO_SUCH_TABLE Table '%s.%s' doesn't exist
3881 (1168 == e) || // 1168 HY000 ER_WRONG_MRG_TABLE Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
3882 (1177 == e) || // 1177 42000 ER_CHECK_NO_SUCH_TABLE Can't open table
3883 (1472 == e) // 1472 HY000 ER_ADMIN_WRONG_MRG_TABLE Table '%s' is differently defined or of non-MyISAM type or doesn't exist
3884 )
3885 {
3886 W("Table %s doesn't exist. Yet.", table);
3887 free(sql);
3888 return 0;
3889 }
3862 } 3890 }
3863 else 3891 else
3864 { 3892 {