aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 {