[MediaWiki-commits] [Gerrit] Fix syntax errors in the sql query - change (analytics/limn-language-data)

2015-07-10 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/224220

Change subject: Fix syntax errors in the sql query
..

Fix syntax errors in the sql query

Wiki codes like 'as', 'or', 'is', 'to' are reserved keywords in sql.
They are now escaped using `.

Change-Id: I05914b5f62418fdeb5457b530e50aebe8c88875e
---
M language/content_translation_beta.sql
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-language-data 
refs/changes/20/224220/1

diff --git a/language/content_translation_beta.sql 
b/language/content_translation_beta.sql
index df759c6..b1e949f 100644
--- a/language/content_translation_beta.sql
+++ b/language/content_translation_beta.sql
@@ -502,7 +502,7 @@
 left join
 ( select count(*) as vepwiki from vepwiki.user_properties 
where up_property = 'cx' and up_value = 1 ) vep on 1=1
 left join
-( select count(*) as aswiki from aswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) as on 1=1
+( select count(*) as aswiki from aswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `as` on 1=1
 left join
 ( select count(*) as bnwiki from bnwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) bn on 1=1
 left join
@@ -524,7 +524,7 @@
 left join
 ( select count(*) as newwiki from newwiki.user_properties 
where up_property = 'cx' and up_value = 1 ) new on 1=1
 left join
-( select count(*) as orwiki from orwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) or on 1=1
+( select count(*) as orwiki from orwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `or` on 1=1
 left join
 ( select count(*) as piwiki from piwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) pi on 1=1
 left join
@@ -644,7 +644,7 @@
 left join
 ( select count(*) as tetwiki from tetwiki.user_properties 
where up_property = 'cx' and up_value = 1 ) tet on 1=1
 left join
-( select count(*) as towiki from towiki.user_properties where 
up_property = 'cx' and up_value = 1 ) to on 1=1
+( select count(*) as towiki from towiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `to` on 1=1
 left join
 ( select count(*) as tywiki from tywiki.user_properties where 
up_property = 'cx' and up_value = 1 ) ty on 1=1
 left join
@@ -668,7 +668,7 @@
 left join
 ( select count(*) as ikwiki from ikwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) ik on 1=1
 left join
-( select count(*) as iswiki from iswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) is on 1=1
+( select count(*) as iswiki from iswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `is` on 1=1
 left join
 ( select count(*) as klwiki from klwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) kl on 1=1
 ) seventh30

-- 
To view, visit https://gerrit.wikimedia.org/r/224220
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05914b5f62418fdeb5457b530e50aebe8c88875e
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-language-data
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix syntax errors in the sql query - change (analytics/limn-language-data)

2015-07-10 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix syntax errors in the sql query
..


Fix syntax errors in the sql query

Wiki codes like 'as', 'or', 'is', 'to' are reserved keywords in sql.
They are now escaped using `.

Change-Id: I05914b5f62418fdeb5457b530e50aebe8c88875e
---
M language/content_translation_beta.sql
M language/content_translation_beta_manual.sql
2 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  KartikMistry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/language/content_translation_beta.sql 
b/language/content_translation_beta.sql
index df759c6..b1e949f 100644
--- a/language/content_translation_beta.sql
+++ b/language/content_translation_beta.sql
@@ -502,7 +502,7 @@
 left join
 ( select count(*) as vepwiki from vepwiki.user_properties 
where up_property = 'cx' and up_value = 1 ) vep on 1=1
 left join
-( select count(*) as aswiki from aswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) as on 1=1
+( select count(*) as aswiki from aswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `as` on 1=1
 left join
 ( select count(*) as bnwiki from bnwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) bn on 1=1
 left join
@@ -524,7 +524,7 @@
 left join
 ( select count(*) as newwiki from newwiki.user_properties 
where up_property = 'cx' and up_value = 1 ) new on 1=1
 left join
-( select count(*) as orwiki from orwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) or on 1=1
+( select count(*) as orwiki from orwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `or` on 1=1
 left join
 ( select count(*) as piwiki from piwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) pi on 1=1
 left join
@@ -644,7 +644,7 @@
 left join
 ( select count(*) as tetwiki from tetwiki.user_properties 
where up_property = 'cx' and up_value = 1 ) tet on 1=1
 left join
-( select count(*) as towiki from towiki.user_properties where 
up_property = 'cx' and up_value = 1 ) to on 1=1
+( select count(*) as towiki from towiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `to` on 1=1
 left join
 ( select count(*) as tywiki from tywiki.user_properties where 
up_property = 'cx' and up_value = 1 ) ty on 1=1
 left join
@@ -668,7 +668,7 @@
 left join
 ( select count(*) as ikwiki from ikwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) ik on 1=1
 left join
-( select count(*) as iswiki from iswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) is on 1=1
+( select count(*) as iswiki from iswiki.user_properties where 
up_property = 'cx' and up_value = 1 ) `is` on 1=1
 left join
 ( select count(*) as klwiki from klwiki.user_properties where 
up_property = 'cx' and up_value = 1 ) kl on 1=1
 ) seventh30
diff --git a/language/content_translation_beta_manual.sql 
b/language/content_translation_beta_manual.sql
index 90db624..d227bf5 100644
--- a/language/content_translation_beta_manual.sql
+++ b/language/content_translation_beta_manual.sql
@@ -502,7 +502,7 @@
 left join
 ( select count(*) as vepwiki from vepwiki.user_properties 
where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user 
from vepwiki.user_properties where up_property = 'betafeatures-auto-enroll' and 
up_value = 1 ) ) vep on 1=1
 left join
-( select count(*) as aswiki from aswiki.user_properties where 
up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from 
aswiki.user_properties where up_property = 'betafeatures-auto-enroll' and 
up_value = 1 ) ) as on 1=1
+( select count(*) as aswiki from aswiki.user_properties where 
up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from 
aswiki.user_properties where up_property = 'betafeatures-auto-enroll' and 
up_value = 1 ) ) `as` on 1=1
 left join
 ( select count(*) as bnwiki from bnwiki.user_properties where 
up_property = 'cx' and up_value = 1 and up_user not in ( select up_user from 
bnwiki.user_properties where up_property = 'betafeatures-auto-enroll' and 
up_value = 1 ) ) bn on 1=1
 left join
@@ -524,7 +524,7 @@
 left join
 ( select count(*) as newwiki from newwiki.user_properties 
where up_property = 'cx' and up_value = 1 and up_user not in ( select up_user 
from